3 # Run a simple backup of the /usr directory
7 bin/bacula stop 2>&1 >/dev/null
9 ./drop_bacula_tables >/dev/null 2>&1
10 ./make_bacula_tables >/dev/null 2>&1
11 ./grant_bacula_privileges 2>&1 >/dev/null
14 scripts/copy-tape-confs
16 echo "/usr" >/tmp/file-list
19 echo " === Starting usr-tape-root test ==="
22 bin/bacula start 2>&1 >/dev/null
23 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
27 label storage=DDS-4 Volume=TestVolume001 slot=0
28 run job=NightlySave yes
35 restore where=${cwd}/tmp/bacula-restores select all done
42 bin/bacula stop 2>&1 >/dev/null
44 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/original
45 cd ${cwd}/tmp/bacula-restores
46 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/restored
48 sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% original >1
51 sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% restored >1
56 diff tmp/original tmp/restored 2>&1 1>/dev/nul
60 echo " ===== usr-tape-root failed!!! ===== "
61 echo " ===== usr-tape-root failed!!! ===== " >>test.out
64 echo " ===== usr-tape-root OK ===== "
65 echo " ===== usr-tape-root OK ===== " >>test.out