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
14 ./drop_bacula_tables >/dev/null 2>&1
15 ./make_bacula_tables >/dev/null 2>&1
16 ./grant_bacula_privileges 2>&1 >/dev/null
21 echo " === Starting span-vol-test ==="
22 echo " === Starting span-vol-test ===" >working/log
25 bin/bacula start 2>&1 >/dev/null
26 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
30 label storage=File1 volume=TestVolume001
31 label storage=File1 volume=TestVolume002
32 label storage=File1 volume=TestVolume003
33 label storage=File1 volume=TestVolume004
34 update Volume=TestVolume001 MaxVolBytes=3000000
35 update Volume=TestVolume002 MaxVolBytes=3000000
36 update Volume=TestVolume003 MaxVolBytes=3000000
37 run job=NightlySave storage=File1 yes
45 restore where=${cwd}/tmp/bacula-restores select storage=File1
55 scripts/check_for_zombie_jobs storage=File1
56 bin/bacula stop 2>&1 >/dev/null
57 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
59 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
61 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
62 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
65 echo " !!!!! span-vol-test Bacula source failed!!! !!!!! "
66 echo " !!!!! span-vol-test failed!!! !!!!! " >>test.out
69 echo " ===== span-vol-test Bacula source OK ===== "
70 echo " ===== span-vol-test OK ===== " >>test.out