#!/bin/sh # # Run a simple backup of the Bacula build directory using the compressed option # then backup four times, each with incremental then finally restore. # It should require at least 4 different bsrs. # TestName="relabel-tape" JobName=Relabeltape . scripts/functions scripts/cleanup-tape scripts/copy-tape-confs echo "${cwd}/build" >/tmp/file-list change_jobname $JobName start_test cat <tmp/bconcmds @output /dev/null messages @$out tmp/log1.out label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default run job=$JobName level=Full yes wait messages add pool=Default storage=DDS-4 0 TestVolume002 @# set status to append update volume=TestVolume001 1 . run job=$JobName level=Full yes @sleep 20 unmount storage=DDS-4 unmount storage=DDS-4 @#setdebug level=150 storage=DDS-4 purge volume=TestVolume001 relabel oldvolume=TestVolume001 volume=TestVolume003 slot=0 pool=Default storage=DDS-4 list volumes mount storage=DDS-4 messages wait run job=$JobName level=Full yes wait messages @$out quit END_OF_DATA run_bacula check_for_zombie_jobs storage=DDS-4 echo "Backup done" # # now do several restores to ensure we cleanup between jobs # cat <tmp/bconcmds @$out /dev/null restore where=${cwd}/tmp/bacula-restores select all done yes wait restore where=${cwd}/tmp/bacula-restores select all done yes wait @$out tmp/log2.out @# @# now unmount the tape and start two restores @# at the same time @# unmount storage=DDS-4 restore where=${cwd}/tmp/bacula-restores select all done yes restore where=${cwd}/tmp/bacula-restores select unmark * mark * done yes mount storage=DDS-4 wait messages @$out quit END_OF_DATA run_bconsole check_for_zombie_jobs storage=DDS-4 stop_bacula check_two_logs check_restore_diff end_test