3 # Copyright (C) 2000-2017 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
6 # Run a simple backup of a big file but
7 # split the archive into four volumes, two of which are
8 # totally full. I.e. make sure that bsr selects all tapes
9 # including those fully spanned.
11 TestName="file-span-vol-test"
16 scripts/copy-test-confs
19 dd if=/dev/zero of=$tmp/big count=10000 > /dev/null
21 echo "$tmp/big" >${cwd}/tmp/file-list
22 echo "${cwd}/build" >>${cwd}/tmp/file-list
23 change_jobname NightlySave $JobName
26 # Remove last / and convert first / to "cd /"
27 CD=`echo $tmp | sed 's:/$::' | sed 's:^/:cd /:'`
30 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
33 @$out ${cwd}/tmp/log1.out
34 label storage=File1 volume=TestVolume004
35 label storage=File1 volume=TestVolume003
36 label storage=File1 volume=TestVolume002
37 label storage=File1 volume=TestVolume001
38 update Volume=TestVolume004 MaxVolBytes=3000000
39 update Volume=TestVolume003 MaxVolBytes=3000000
40 update Volume=TestVolume002 MaxVolBytes=3000000
41 run job=$JobName fileset=SimpleSet storage=File1 yes
48 @$out ${cwd}/tmp/log2.out
49 restore where=$tmp/bacula-restores select storage=File1
61 check_for_zombie_jobs storage=File1
66 diff -q $tmp/big $tmp/bacula-restores/$tmp/big
68 print_debug "ERROR: $tmp/big $tmp/bacula-restores/$tmp/big are different"
69 print_debug `ls -l $tmp/big $tmp/bacula-restores/$tmp/big are different`