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 " ===== !!!! lib-test-root not run !!!! ===== "
11 echo " ===== !!!! lib-test-root not run !!!! ===== " >>test.out
16 scripts/copy-test-confs
18 echo "/lib" >/tmp/file-list
22 echo " === Starting /lib save/restore test ==="
26 bin/bacula start 2>&1 >/dev/null
27 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
41 restore where=${cwd}/tmp/bacula-restores select
51 bin/bacula stop 2>&1 >/dev/null
53 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-lib-test lib >${cwd}/tmp/original
54 cd ${cwd}/tmp/bacula-restores
55 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-lib-test lib >${cwd}/tmp/restored
57 sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% original >1
60 sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% restored >1
65 diff tmp/original tmp/restored 2>&1 1>/dev/nul
69 echo " ===== !!!! lib-test-root failed !!!! ===== "
70 echo " ===== !!!! lib-test-root failed !!!! ===== " >>test.out
73 echo " ===== lib-test-root OK ===== "
74 echo " ===== lib-test-root OK ===== " >>test.out