#!/bin/sh # # Run a simple backup of the Bacula build directory but # split the archive into two volumes then bscan it # into the catalog after the backup. It also to a limited # extent tests the purge volume and delete volume commands. # TestName="bscan-test" JobName=bscan . scripts/functions set_debug 0 cwd=`pwd` scripts/cleanup scripts/copy-test-confs echo "${cwd}/build" >/tmp/file-list change_jobname NightlySave $JobName start_test cat <tmp/bconcmds @$out /dev/null messages @$out tmp/log1.out label storage=File1 TestVolume001 label storage=File1 TestVolume002 update Volume=TestVolume001 MaxVolBytes=3000000 run job=$JobName storage=File1 yes wait messages @$out /dev/null @# @# now purge the Volume @# purge volume=TestVolume001 purge volume=TestVolume002 delete volume=TestVolume001 yes delete volume=TestVolume002 yes messages quit END_OF_DATA run_bacula check_for_zombie_jobs storage=File1 stop_bacula echo "volume=TestVolume001|TestVolume002" >tmp/bscan.bsr if test "$debug" -eq 1 ; then bin/bscan -w working -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp else bin/bscan -w working -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp 2>&1 >/dev/null fi cat <tmp/bconcmds @$out /dev/null messages @$out tmp/log2.out @# @# now do a restore @# @#setdebug level=400 storage=File1 restore bootstrap=${cwd}/tmp/kern.bsr where=${cwd}/tmp/bacula-restores select all storage=File1 done yes wait messages @$out quit END_OF_DATA # now run restore run_bacula check_for_zombie_jobs storage=File1 stop_bacula check_two_logs check_restore_diff end_test