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