3 # Run a simple backup of the /lib directory
8 bin/bacula stop 2>&1 >/dev/null
10 ./drop_bacula_tables >/dev/null 2>&1
11 ./make_bacula_tables >/dev/null 2>&1
12 ./grant_bacula_privileges 2>&1 >/dev/null
16 scripts/copy-tape-confs
17 echo "/lib" >${cwd}/tmp/file-list
20 echo " === Starting lib-tape-root test ==="
23 bin/bacula start 2>&1 >/dev/null
24 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
27 @output ${cwd}/tmp/log1.out
28 label storage=DDS-4 Volume=TestVolume001 slot=0
29 run job=NightlySave yes
35 @output ${cwd}/tmp/log2.out
36 restore where=${cwd}/tmp/bacula-restores select all done
43 bin/bacula stop 2>&1 >/dev/null
45 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/original
46 cd ${cwd}/tmp/bacula-restores
47 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/restored
49 sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% original >1
52 sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% restored >1
57 diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 1>/dev/nul
61 echo " ===== lib-tape-root failed!!! ===== "
62 echo " ===== lib-tape-root failed!!! ===== " >>test.out
65 echo " ===== lib-tape-root OK ===== "
66 echo " ===== lib-tape-root OK ===== " >>test.out