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 all / to cd commands
27 CD=`echo $tmp | sed 's:/$::' | sed 's:/:\ncd :g'`
29 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
32 @$out ${cwd}/tmp/log1.out
33 label storage=File1 volume=TestVolume004
34 label storage=File1 volume=TestVolume003
35 label storage=File1 volume=TestVolume002
36 label storage=File1 volume=TestVolume001
37 update Volume=TestVolume004 MaxVolBytes=3000000
38 update Volume=TestVolume003 MaxVolBytes=3000000
39 update Volume=TestVolume002 MaxVolBytes=3000000
40 run job=$JobName fileset=SimpleSet storage=File1 yes
47 @$out ${cwd}/tmp/log2.out
48 restore where=$tmp/bacula-restores select storage=File1
60 check_for_zombie_jobs storage=File1
65 diff -q $tmp/big $tmp/bacula-restores/$tmp/big
67 print_debug "ERROR: $tmp/big $tmp/bacula-restores/$tmp/big are different"
68 print_debug `ls -l $tmp/big $tmp/bacula-restores/$tmp/big are different`