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