3 # Run a simple backup of the Bacula build directory using the compressed option
4 # then backup a second time and finally restore it
7 scripts/copy-test-confs
9 echo "${cwd}/build" >/tmp/file-list
13 echo " === Starting two-jobs-test ==="
14 echo " === Starting two-jobs-test ===" >>working/log
17 bin/bacula start 2>&1 >/dev/null
18 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
19 setdebug level=15 storage=File
23 estimate job=CompressedTest listing
24 estimate job=CompressedTest listing
25 estimate job=CompressedTest listing
28 label storage=File volume=TestVolume001
29 run job=CompressedTest yes
34 scripts/check_for_zombie_jobs storage=File
36 touch ${cwd}/build/src/dird/*.c
40 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
44 run job=CompressedTest
49 @# now do several restores to ensure we cleanup between jobs
52 restore where=${cwd}/tmp/bacula-restores select all storage=File done
55 restore where=${cwd}/tmp/bacula-restores select all storage=File done
59 restore where=${cwd}/tmp/bacula-restores select storage=File
69 scripts/check_for_zombie_jobs storage=File
70 bin/bacula stop 2>&1 >/dev/null
71 grep "
\0Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
73 grep "
\0Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
75 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
76 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
79 echo " !!!!! two-jobs-test Bacula source failed!!! !!!!! "
80 echo " !!!!! two-jobs-test failed!!! !!!!! " >>test.out
81 if [ $bstat != 0 -o $rstat != 0 ] ; then
82 echo " !!!!! Bad Job termination status !!!!! "
83 echo " !!!!! Bad Job termination status !!!!! " >>test.out
85 echo " !!!!! Restored files differ !!!!! "
86 echo " !!!!! Restored files differ !!!!! " >>test.out
90 echo " ===== two-jobs-test Bacula source OK ===== "
91 echo " ===== two-jobs-test OK ===== " >>test.out