3 # Run a simple backup of the /usr directory
7 bin/bacula stop 2>&1 >/dev/null
11 scripts/copy-tape-confs
13 echo "/usr" >/tmp/file-list
16 echo " === Starting usr-tape-root test ==="
19 bin/bacula start 2>&1 >/dev/null
20 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
24 label storage=DDS-4 Volume=TestVolume001 slot=0
25 run job=NightlySave yes
32 restore where=${cwd}/tmp/bacula-restores select all
39 bin/bacula stop 2>&1 >/dev/null
41 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/original
42 cd ${cwd}/tmp/bacula-restores
43 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/restored
45 sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% original >1
48 sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% restored >1
53 diff tmp/original tmp/restored 2>&1 1>/dev/nul
57 echo " ===== usr-tape-root failed!!! ===== "
58 echo " ===== usr-tape-root failed!!! ===== " >>test.out
61 echo " ===== usr-tape-root OK ===== "
62 echo " ===== usr-tape-root OK ===== " >>test.out