3 # Run a simple backup of the Bacula build directory using the compressed option
4 # then backup four times, each with incremental then finally restore.
5 # It should require at least 4 different bsrs.
8 scripts/copy-test-confs
10 echo "${cwd}/build" >/tmp/file-list
11 bin/bacula stop 2>&1 >/dev/null
13 ./drop_bacula_tables >/dev/null 2>&1
14 ./make_bacula_tables >/dev/null 2>&1
15 ./grant_bacula_privileges 2>&1 >/dev/null
20 echo " === Starting four-jobs-test ==="
21 echo " === Starting four-jobs-test ===" >>working/log
24 bin/bacula start 2>&1 >/dev/null
25 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
27 estimate job=CompressedTest listing
28 estimate job=CompressedTest listing
29 estimate job=CompressedTest listing
32 label storage=File volume=TestVolume001
33 run job=CompressedTest yes
38 scripts/check_for_zombie_jobs storage=File
40 # make some files for the incremental to pick up
41 touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
42 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
47 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
51 run job=CompressedTest
57 scripts/check_for_zombie_jobs storage=File
59 touch ${cwd}/build/src/dird/*.c
60 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
64 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
68 label storage=File volume=TestVolume001
69 run job=CompressedTest yes
74 scripts/check_for_zombie_jobs storage=File
76 # make some files for the incremental to pick up
77 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
81 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
85 label storage=File volume=TestVolume001
86 run job=CompressedTest yes
91 scripts/check_for_zombie_jobs storage=File
94 # now do several restores to ensure we cleanup between jobs
96 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
98 restore where=${cwd}/tmp/bacula-restores select all storage=File
101 restore where=${cwd}/tmp/bacula-restores select all storage=File
105 restore where=${cwd}/tmp/bacula-restores select storage=File
115 scripts/check_for_zombie_jobs storage=File
116 bin/bacula stop 2>&1 >/dev/null
117 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
119 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
121 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
122 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
125 echo " !!!!! four-jobs-test Bacula source failed!!! !!!!! "
126 echo " !!!!! four-jobs-test failed!!! !!!!! " >>test.out
129 echo " ===== four-jobs-test Bacula source OK ===== "
130 echo " ===== four-jobs-test OK ===== " >>test.out