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"
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/bconsole -c bin/bconsole.conf <<END_OF_DATA
34 run job=MultiVol storage=File yes
41 restore where=${cwd}/tmp/bacula-restores select 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 tmp/largefile tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null
54 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
57 echo " !!!!! six-vol-test Bacula source failed!!! !!!!! "
58 echo " !!!!! six-vol-test failed!!! !!!!! " >>test.out
61 echo " ===== six-vol-test Bacula source OK ===== "
62 echo " ===== six-vol-test OK ===== " >>test.out