3 # Run a simple backup of the Bacula build directory
7 TestName="dev-test-root"
13 scripts/copy-test-confs
14 echo "/dev" >${cwd}/tmp/file-list
18 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
21 @output ${cwd}/tmp/log1.out
22 label storage=File volume=TestVolume001 pool=Default
23 run job=NightlySave yes
29 @output ${cwd}/tmp/log2.out
30 restore where=${cwd}/tmp/bacula-restores select all done
39 check_for_zombie_jobs storage=File
42 # More cleanup needed below
45 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test dev >${cwd}/tmp/original
46 cd ${cwd}/tmp/bacula-restores
47 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test dev >${cwd}/tmp/restored
50 # Use sed to cut out parts that *always* change
52 cat >sed.scr <<END_OF_DATA
54 s%.*[0-9][0-9]:[0-9][0-9]:[0-9][0-9] dev/ptmx%dev/ptmx%
55 s%.*[0-9][0-9]:[0-9][0-9]:[0-9][0-9] dev/ttyp1%dev/ttyp1%
56 s%.*[0-9][0-9]:[0-9][0-9]:[0-9][0-9] dev/null%dev/null%
59 # strip file system change messages then sed and sort
60 grep -v "Skip: File system change prohibited." original >1
61 sed -f sed.scr 1 | sort >original
64 sed -f sed.scr 1 | sort >restored
68 diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 1>/dev/null
72 echo " ===== !!!! dev-test-root failed !!!! ===== "
73 echo " ===== !!!! dev-test-root failed !!!! ===== " >>test.out
76 echo " ===== dev-test-root OK ===== "
77 echo " ===== dev-test-root OK ===== " >>test.out