#!/bin/sh # # Run a backup of a small file, then do several other backups # to expand the size of a volume. Then do a restore of the first # file, and make sure it doesn't read to the end of the disk. # TestName="bsr-read-test" JobName=bsr-read . scripts/functions scripts/cleanup scripts/copy-migration-confs scripts/prepare-disk-changer cp ${cwd}/build/configure ${cwd}/tmp cat ${cwd}/build/configure >> ${cwd}/tmp/configure echo "${cwd}/tmp/configure" >${cwd}/tmp/file-list echo "${cwd}/build" >>${cwd}/tmp/file-list change_jobname NightlySave $JobName start_test cat <${cwd}/tmp/bconcmds @$out /dev/null messages @$out ${cwd}/tmp/log1.out label storage=File volume=TestVolume001 pool=Default label storage=File volume=TestVolume002 pool=Default label storage=File volume=TestVolume003 pool=Default update Volume=TestVolume001 maxvolbytes=120000 update Volume=TestVolume002 maxvolbytes=120000 run job=$JobName yes wait messages list jobs @# print the JobMedia records sql select * from JobMedia; quit END_OF_DATA run_bacula check_for_zombie_jobs storage=File stop_bacula echo "${cwd}/build" >${cwd}/tmp/file-list cat <${cwd}/tmp/bconcmds @$out /dev/null messages @$out ${cwd}/tmp/log1.out run job=$JobName level=Full yes wait messages run job=$JobName level=Full yes wait messages @# @# now do a restore @# @$out ${cwd}/tmp/log2.out setdebug level=30 trace=1 fd setdebug level=500 trace=1 storage=File sql @# print the JobMedia records select * from JobMedia; restore 3 1 mark * done yes wait messages @# @# now do a restore of the second job (to compare offset) @# @$out ${cwd}/tmp/log3.out restore 3 2 mark * done yes wait messages @$out label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0 label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0 update volume=TestVolume003 volstatus=Used run job=migrate-job jobid=1 yes run job=migrate-job jobid=2 yes wait messages quit END_OF_DATA run_bacula check_for_zombie_jobs storage=File stop_bacula check_two_logs # check_restore_tmp_build_diff dstat=0 end_test