3 # Run a simple backup of the Bacula build directory but
4 # split the archive into two volumes then bscan it
5 # into the catalog after the backup. It also to a limited
6 # extent tests the purge volume and delete volume commands.
9 scripts/copy-test-confs
11 echo "${cwd}/build" >/tmp/file-list
12 bin/bacula stop 2>&1 >/dev/null
13 bin/drop_sqlite_tables
14 bin/make_sqlite_tables
18 echo " === Starting bscan-test ==="
19 echo " === Starting bscan-test ===" >working/log
23 bin/console -c bin/console.conf <<END_OF_DATA
30 update Volume=TestVolume001
35 run job=NightlySave storage=File1
40 @# now purge the Volume
42 purge volume=TestVolume001
43 purge volume=TestVolume002
44 delete volume=TestVolume001
46 delete volume=TestVolume002
51 echo "volume=TestVolume001|TestVolume002" >tmp/bscan.bsr
52 bin/bscan -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp
54 bin/console -c bin/console.conf <<END_OF_DATA
60 restore where=${cwd}/tmp/bacula-restores
69 diff -r build tmp/bacula-restores${cwd}/build
73 echo " ===== bscan-test Bacula source failed!!! ===== "
74 echo " ===== bscan-test failed!!! ===== " >>test.out
77 echo " ===== bscan-test Bacula source OK ===== "
78 echo " ===== bscan-test OK ===== " >>test.out