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.
14 scripts/copy-test-confs
15 echo "${cwd}/build" >tmp/file-list
17 change_jobname NightlySave $JobName
20 cat <<END_OF_DATA >tmp/bconcmds
28 update Volume=TestVolume001 MaxVolBytes=3000000
29 run job=$JobName storage=File1
35 select * from JobMedia;
41 @# now purge the Volume
43 purge volume=TestVolume001
44 purge volume=TestVolume002
45 delete volume=TestVolume001
47 delete volume=TestVolume002
54 check_for_zombie_jobs storage=File1
57 echo "volume=TestVolume001" >tmp/bscan.bsr
58 echo "volume=TestVolume002" >>tmp/bscan.bsr
62 # If the database has a password pass it to bscan
63 if test "x${db_password}" = "x"; then
66 PASSWD="-P ${db_password}"
69 if test "$debug" -eq 1 ; then
70 bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp
72 bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp 2>&1 >tmp/log3.out
75 cat <<END_OF_DATA >tmp/bconcmds
82 @#setdebug level=400 storage=File1
83 restore bootstrap=${cwd}/tmp/kern.bsr where=${cwd}/tmp/bacula-restores select all storage=File1 done
93 check_for_zombie_jobs storage=File1