3 # Run a simple backup of a big file but
4 # split the archive into four volumes, two of which are
5 # totally full. I.e. make sure that bsr selects all tapes
6 # including those fully spanned.
8 TestName="file-span-vol-test"
13 scripts/copy-test-confs
16 dd if=/dev/zero of=$tmp/big count=10000 > /dev/null
18 echo "$tmp/big" >${cwd}/tmp/file-list
19 echo "${cwd}/build" >>${cwd}/tmp/file-list
20 change_jobname NightlySave $JobName
23 # Remove last / and convert all / to cd commands
24 CD=`echo $tmp | sed 's:/$::' | sed 's:/:\ncd :g'`
26 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
29 @$out ${cwd}/tmp/log1.out
30 label storage=File1 volume=TestVolume004
31 label storage=File1 volume=TestVolume003
32 label storage=File1 volume=TestVolume002
33 label storage=File1 volume=TestVolume001
34 update Volume=TestVolume004 MaxVolBytes=3000000
35 update Volume=TestVolume003 MaxVolBytes=3000000
36 update Volume=TestVolume002 MaxVolBytes=3000000
37 run job=$JobName fileset=SimpleSet storage=File1 yes
44 @$out ${cwd}/tmp/log2.out
45 restore where=$tmp/bacula-restores select storage=File1
57 check_for_zombie_jobs storage=File1
62 diff -q $tmp/big $tmp/bacula-restores/$tmp/big
64 print_debug "ERROR: $tmp/big $tmp/bacula-restores/$tmp/big are different"
65 print_debug `ls -l $tmp/big $tmp/bacula-restores/$tmp/big are different`