3 # Create a 60MB file with random bytes. Back it up to 6 Volumes
4 # each constrained to 10MB using the automatic labeling feature.
7 if test ! -c /dev/urandom ; then
8 echo "No random device. Test skipped.\n"
12 scripts/copy-testa-confs
14 echo "${cwd}/tmp/largefile" >/tmp/file-list
15 # Create 56MB file with random data
16 echo "Creating a 56MB file with random data ..."
17 dd if=/dev/urandom of=${cwd}/tmp/largefile bs=1024 count=55000
18 echo "largefile created"
22 echo " === Starting six-vol-test at `date +%R:%S` ==="
23 echo " === Starting six-vol-test at `date +%R:%S` ===" >>working/log
26 bin/bacula start 2>&1 >/dev/null
27 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
31 run job=MultiVol storage=File yes
38 restore where=${cwd}/tmp/bacula-restores select storage=File
48 scripts/check_for_zombie_jobs storage=File
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 tmp/largefile tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null
55 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
58 echo " !!!!! six-vol-test Bacula source failed!!! !!!!! "
59 echo " !!!!! six-vol-test failed!!! !!!!! " >>test.out
60 if [ $bstat != 0 -o $rstat != 0 ] ; then
61 echo " !!!!! Bad Job termination status !!!!! "
62 echo " !!!!! Bad Job termination status !!!!! " >>test.out
64 echo " !!!!! Restored files differ !!!!! "
65 echo " !!!!! Restored files differ !!!!! " >>test.out
69 echo " ===== six-vol-test Bacula source OK ===== "
70 echo " ===== six-vol-test OK ===== " >>test.out