3 # Run a simple backup of the Bacula build directory
8 echo " === /dev save/restore test ==="
12 if [ $UID != 0 ] ; then
14 echo "You must be root to run this test."
15 echo " ===== dev test failed!!! ===== "
16 echo " ===== dev test failed!!! ===== " >>test.out
21 scripts/copy-test-confs
22 echo "/dev" >/tmp/file-list
23 rm -rf /tmp/TestVolume001 /tmp/bacula-restores
24 bin/bacula stop 2>&1 >/dev/null
25 bin/drop_sqlite_tables
26 bin/make_sqlite_tables
27 bin/bacula start 2>&1 >/dev/null
28 bin/console -c bin/console.conf <<END_OF_DATA
50 bin/bacula stop 2>&1 >/dev/null
52 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test dev >${cwd}/tmp/original
53 cd /tmp/bacula-restores
54 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test dev >${cwd}/tmp/restored
55 diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
59 echo " ===== dev test failed!!! ===== "
60 echo " ===== dev test failed!!! ===== " >>test.out
63 echo " ===== dev test OK ===== "
64 echo " ===== dev test OK ===== " >>test.out