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
10 bin/bacula stop 2>&1 >/dev/null
12 ./drop_bacula_tables >/dev/null 2>&1
13 ./make_bacula_tables >/dev/null 2>&1
14 ./grant_bacula_privileges 2>&1 >/dev/null
19 echo " === Starting two-jobs-test ==="
20 echo " === Starting two-jobs-test ===" >>working/log
23 bin/bacula start 2>&1 >/dev/null
24 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
26 estimate job=CompressedTest listing
27 estimate job=CompressedTest listing
28 estimate job=CompressedTest listing
31 label storage=File volume=TestVolume001
32 run job=CompressedTest yes
38 touch ${cwd}/build/src/dird/*.c
42 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
46 run job=CompressedTest
51 @# now do several restores to ensure we cleanup between jobs
54 restore where=${cwd}/tmp/bacula-restores select all storage=File
57 restore where=${cwd}/tmp/bacula-restores select all storage=File
61 restore where=${cwd}/tmp/bacula-restores select all storage=File
68 bin/bacula stop 2>&1 >/dev/null
69 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
71 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
73 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
74 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
77 echo " !!!!! two-jobs-test Bacula source failed!!! !!!!! "
78 echo " !!!!! two-jobs-test failed!!! !!!!! " >>test.out
81 echo " ===== two-jobs-test Bacula source OK ===== "
82 echo " ===== two-jobs-test OK ===== " >>test.out