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
24 bin/drop_sqlite_tables
25 bin/make_sqlite_tables
27 bin/console -c bin/console.conf <<END_OF_DATA
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 /tmp/original /tmp/restored
58 echo " ===== dev test failed!!! ===== "
59 echo " ===== dev test failed!!! ===== " >>test.out
62 echo " ===== dev test OK ===== "
63 echo " ===== dev test OK ===== " >>test.out
64 rm -rf /tmp/bacula-restores ${cwd}/tmp/original ${cwd}/tmp/restored
65 rm -rf /tmp/file-list /tmp/job /tmp/TestVolume001