3 # Run a simple backup of the Bacula build directory using the compressed option
7 scripts/copy-test-confs
9 echo "${cwd}/tmp/build" >/tmp/file-list
10 mkdir ${cwd}/tmp/build
11 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
15 sed s%\^%${cwd}/tmp/build/% 1 >restore-list
18 bin/bacula stop 2>&1 >/dev/null
20 ./drop_bacula_tables >/dev/null 2>&1
21 ./make_bacula_tables >/dev/null 2>&1
22 ./grant_bacula_privileges 2>&1 >/dev/null
27 echo " === Starting restore-by-file-test ==="
28 echo " === Starting restore-by-file-test ===" >>working/log
31 bin/bacula start 2>&1 >/dev/null
32 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
36 label storage=File volume=TestVolume001
37 run job=CompressedTest yes
44 restore where=${cwd}/tmp/bacula-restores storage=File
46 <${cwd}/tmp/restore-list
54 bin/bacula stop 2>&1 >/dev/null
55 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
57 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
59 diff -r tmp/build tmp/bacula-restores${cwd}/tmp/build 2>&1 >/dev/null
60 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
63 echo " !!!!! restore-by-file-test Bacula source failed!!! !!!!! "
64 echo " !!!!! restore-by-file-test failed!!! !!!!! " >>test.out
67 echo " ===== restore-by-file-test Bacula source OK ===== "
68 echo " ===== restore-by-file-test OK ===== " >>test.out