3 # Run a simple backup of the Bacula build directory using the compressed option
7 scripts/copy-test-confs
9 echo "${cwd}/tmp/build" >/tmp/file-list
10 mkdir ${cwd}/tmp/build
11 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
15 sed s%\^%${cwd}/tmp/build/% 1 >restore-list
21 echo " === Starting restore-by-file-test at `date +%R:%S` ==="
22 echo " === Starting restore-by-file-test at `date +%R:%S` ===" >>working/log
25 bin/bacula start 2>&1 >/dev/null
26 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
30 label storage=File volume=TestVolume001
31 run job=CompressedTest yes
38 restore where=${cwd}/tmp/bacula-restores storage=File
40 <${cwd}/tmp/restore-list
48 scripts/check_for_zombie_jobs storage=File
49 bin/bacula stop 2>&1 >/dev/null
50 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
52 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
54 diff -r tmp/build tmp/bacula-restores${cwd}/tmp/build 2>&1 >/dev/null
55 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
58 echo " !!!!! restore-by-file-test Bacula source failed!!! !!!!! "
59 echo " !!!!! restore-by-file-test failed!!! !!!!! " >>test.out
60 if [ $bstat != 0 -o $rstat != 0 ] ; then
61 echo " !!!!! Bad Job termination status !!!!! "
62 echo " !!!!! Bad Job termination status !!!!! " >>test.out
64 echo " !!!!! Restored files differ !!!!! "
65 echo " !!!!! Restored files differ !!!!! " >>test.out
69 echo " ===== restore-by-file-test Bacula source OK ===== "
70 echo " ===== restore-by-file-test OK ===== " >>test.out