4 # This script dumps the database, deletes the database, loads the database, dumps it again...
5 # ...and then compares the two dumps to see if we have full fidelity between them.
7 # Did you read that correctly? Yes, it will DELETE your database. So don't run this.
9 exit 0 # In fact, here's an exit statement you must delete before you can even run it.
11 ps ax | grep citserver | grep -v grep >/dev/null 2>/dev/null && {
12 echo dont do this while the server is running
16 ./ctdldump -y >dump.dat
17 first=$(md5sum dump.dat | awk ' { print $1 } ' )
19 ./ctdlload -y <dump.dat
20 ./ctdldump -y >dump.dat
21 second=$(md5sum dump.dat | awk ' { print $1 } ' )
25 echo MD5 of initial dump: ${first}
26 echo MD5 of sequent dump: ${second}
28 if [ ${first} == ${second} ] ; then
29 echo Congratulations, you have full fidelity between two dumps.
31 echo Epic fail, you do NOT have full fidelity between two dumps.