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