3 # Run a simple backup of the Bacula build directory 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.
9 scripts/copy-test-confs
11 echo "${cwd}/build" >/tmp/file-list
12 bin/bacula stop 2>&1 >/dev/null
13 bin/drop_sqlite_tables
14 bin/make_sqlite_tables
18 echo " === Starting span-vol-test ==="
19 echo " === Starting span-vol-test ===" >working/log
22 bin/bacula start 2>&1 >/dev/null
23 bin/console -c bin/console.conf <<END_OF_DATA
27 label storage=File1 volume=TestVolume001
28 label storage=File1 volume=TestVolume002
29 label storage=File1 volume=TestVolume003
30 label storage=File1 volume=TestVolume004
31 update Volume=TestVolume001 MaxVolBytes=3000000
32 update Volume=TestVolume002 MaxVolBytes=3000000
33 update Volume=TestVolume003 MaxVolBytes=3000000
34 run job=NightlySave storage=File1 yes
42 restore where=${cwd}/tmp/bacula-restores select all
49 bin/bacula stop 2>&1 >/dev/null
50 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
52 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
54 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
55 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
58 echo " !!!!! span-vol-test Bacula source failed!!! !!!!! "
59 echo " !!!!! span-vol-test failed!!! !!!!! " >>test.out
62 echo " ===== span-vol-test Bacula source OK ===== "
63 echo " ===== span-vol-test OK ===== " >>test.out