#!/bin/sh # # Run a simple backup of the Bacula build directory but # split the archive into two volumes, then build a BSR with # the restore command and use bextract to restore the files. # cwd=`pwd` scripts/copy-test-confs scripts/cleanup echo "${cwd}/build" >/tmp/file-list bin/bacula stop 2>&1 >/dev/null bin/drop_sqlite_tables bin/make_sqlite_tables echo " " echo " " echo " === Starting bextract-test ===" echo " === Starting bextract-test ===" >working/log echo " " bin/bacula start 2>&1 >/dev/null bin/console -c bin/console.conf <&1 >/dev/null mkdir -p ${cwd}/tmp/bacula-restores bin/bextract -b working/restore.bsr -c bin/bacula-sd.conf ${cwd}/tmp ${cwd}/tmp/bacula-restores 2>&1 >/dev/null grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null bstat=$? diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null if [ $? != 0 -o $bstat != 0 ] ; then echo " " echo " " echo " !!!!! bextract-test Bacula source failed!!! !!!!! " echo " !!!!! bextract-test failed!!! !!!!! " >>test.out echo " " else echo " ===== bextract-test Bacula source OK ===== " echo " ===== bextract-test OK ===== " >>test.out scripts/cleanup fi