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
11 bin/drop_sqlite_tables
12 bin/make_sqlite_tables
16 echo " === Starting two-jobs-test ==="
17 echo " === Starting two-jobs-test ===" >>working/log
20 bin/bacula start 2>&1 >/dev/null
21 bin/console -c bin/console.conf <<END_OF_DATA
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
35 touch ${cwd}/build/src/dird/*.c
39 bin/console -c bin/console.conf <<END_OF_DATA
43 run job=CompressedTest
48 @# now do several restores to ensure we cleanup between jobs
65 bin/bacula stop 2>&1 >/dev/null
66 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
68 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
70 diff -r build /tmp/bacula-restores${cwd}/build
71 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
74 echo " !!!!! two-jobs-test Bacula source failed!!! !!!!! "
75 echo " !!!!! two-jobs-test failed!!! !!!!! " >>test.out
78 echo " ===== two-jobs-test Bacula source OK ===== "
79 echo " ===== two-jobs-test OK ===== " >>test.out