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 ! -e /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"
19 bin/bacula stop 2>&1 >/dev/null
20 bin/drop_sqlite_tables
21 bin/make_sqlite_tables
25 echo " === Starting six-vol-test ==="
26 echo " === Starting six-vol-test ===" >>working/log
29 bin/bacula start 2>&1 >/dev/null
30 bin/console -c bin/console.conf <<END_OF_DATA
34 run job=MultiVol storage=File
42 restore where=${cwd}/tmp/bacula-restores
51 bin/bacula stop 2>&1 >/dev/null
52 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
54 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
56 diff tmp/largefile tmp/bacula-restores${cwd}/tmp/largefile
57 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
60 echo " !!!!! six-vol-test Bacula source failed!!! !!!!! "
61 echo " !!!!! six-vol-test failed!!! !!!!! " >>test.out
64 echo " ===== six-vol-test Bacula source OK ===== "
65 echo " ===== six-vol-test OK ===== " >>test.out