#!/bin/sh # # Run a simple backup of the Bacula build directory but # split the archive into two volumes # cwd=`pwd` scripts/copy-test-confs scripts/cleanup echo "${cwd}/build" >/tmp/file-list echo " " echo " " echo " === Starting two-vol-test ===" echo " === Starting two-vol-test ===" >working/log echo " " bin/bacula start 2>&1 >/dev/null bin/bconsole -c bin/bconsole.conf <&1 >/dev/null grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null bstat=$? grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null rstat=$? diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then echo " " echo " " echo " !!!!! two-vol-test Bacula source failed!!! !!!!! " echo " !!!!! two-vol-test failed!!! !!!!! " >>test.out echo " " else echo " ===== two-vol-test Bacula source OK ===== " echo " ===== two-vol-test OK ===== " >>test.out scripts/cleanup fi