#!/bin/sh # # Run a simple backup of the Bacula build directory # then restore it. # echo " " echo " " echo " === /dev save/restore test ===" echo " " echo " " if [ $UID != 0 ] ; then echo " " echo "You must be root to run this test." echo " ===== dev test failed!!! ===== " echo " ===== dev test failed!!! ===== " >>test.out echo " " exit 1 fi cwd=`pwd` scripts/copy-test-confs echo "/dev" >/tmp/file-list rm -rf /tmp/TestVolume001 /tmp/bacula-restores bin/bacula stop bin/drop_sqlite_tables bin/make_sqlite_tables bin/bacula start bin/console -c bin/console.conf <${cwd}/tmp/original cd /tmp/bacula-restores ${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test dev >${cwd}/tmp/restored diff /tmp/original /tmp/restored if [ $? != 0 ] ; then echo " " echo " " echo " ===== dev test failed!!! ===== " echo " ===== dev test failed!!! ===== " >>test.out echo " " else echo " ===== dev test OK ===== " echo " ===== dev test OK ===== " >>test.out rm -rf /tmp/bacula-restores ${cwd}/tmp/original ${cwd}/tmp/restored rm -rf /tmp/file-list /tmp/job /tmp/TestVolume001 fi