3 # Run a simple backup of the /usr directory
8 scripts/copy-tape-confs
10 echo "/usr" >${cwd}/tmp/file-list
14 echo " === Starting usr-tape-root test ==="
18 bin/bacula start 2>&1 >/dev/null
19 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
23 label storage=DDS-4 Volume=TestVolume001 slot=0
24 run job=NightlySave yes
31 restore where=${cwd}/tmp/bacula-restores select all done
38 bin/bacula stop 2>&1 >/dev/null
40 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/original
41 cd ${cwd}/tmp/bacula-restores
42 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/restored
44 sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% original >1
47 sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% restored >1
52 diff tmp/original tmp/restored 2>&1 1>/dev/nul
56 echo " ===== !!!! usr-tape-root failed !!!! ===== "
57 echo " ===== !!!! usr-tape-root failed !!!! ===== " >>test.out
60 echo " ===== usr-tape-root OK ===== "
61 echo " ===== usr-tape-root OK ===== " >>test.out