3 # Run a simple backup of the Bacula build directory
7 if [ $MUID != 0 ] ; then
9 echo "You must be root to run this test."
10 echo " ===== !!!! etc-test-root not run !!!! ===== "
11 echo " ===== !!!! etc-test-root not run !!!! ===== " >>test.out
17 echo " === Starting /etc save/restore test ==="
22 scripts/copy-test-confs
23 echo "/etc" >/tmp/file-list
25 bin/bacula start 2>&1 >/dev/null
26 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
40 restore where=${cwd}/tmp/bacula-restores select
50 bin/bacula stop 2>&1 >/dev/null
52 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test etc >${cwd}/tmp/1
53 cd ${cwd}/tmp/bacula-restores
54 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test etc >${cwd}/tmp/2
55 sort <${cwd}/tmp/1 >${cwd}/tmp/original
56 sort <${cwd}/tmp/2 >${cwd}/tmp/restored
57 rm -f ${cwd}/tmp/1 ${cwd}/tmp/2
59 diff tmp/original tmp/restored 2>&1 1>/dev/null
63 echo " ===== !!!! etc-test-root failed !!!! ===== "
64 echo " ===== !!!! etc-test-root failed !!!! ===== " >>test.out
67 echo " ===== etc-test-root OK ===== "
68 echo " ===== etc-test-root OK ===== " >>test.out