3 # Run a simple backup of the Bacula build directory but
4 # split the archive into four volumes, two of which are
8 scripts/copy-test-confs
10 echo "${cwd}/build" >/tmp/file-list
11 bin/bacula stop 2>&1 >/dev/null
12 bin/drop_sqlite_tables
13 bin/make_sqlite_tables
17 echo " === Starting span-vol-test ==="
18 echo " === Starting span-vol-test ===" >working/log
21 bin/bacula start 2>&1 >/dev/null
22 bin/console -c bin/console.conf <<END_OF_DATA
26 label storage=File1 volume=TestVolume001
27 label storage=File1 volume=TestVolume002
28 label storage=File1 volume=TestVolume003
29 label storage=File1 volume=TestVolume004
30 update Volume=TestVolume001 MaxVolBytes=3000000
31 update Volume=TestVolume002 MaxVolBytes=3000000
32 update Volume=TestVolume003 MaxVolBytes=3000000
33 run job=NightlySave storage=File1 yes
41 restore where=${cwd}/tmp/bacula-restores current all
48 bin/bacula stop 2>&1 >/dev/null
49 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
51 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
53 diff -r build tmp/bacula-restores${cwd}/build
54 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
57 echo " !!!!! span-vol-test Bacula source failed!!! !!!!! "
58 echo " !!!!! span-vol-test failed!!! !!!!! " >>test.out
61 echo " ===== span-vol-test Bacula source OK ===== "
62 echo " ===== span-vol-test OK ===== " >>test.out