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
19 bin/drop_sqlite_tables
20 bin/make_sqlite_tables
24 echo " === Starting restore-by-file-test ==="
25 echo " === Starting restore-by-file-test ===" >>working/log
28 bin/bacula start 2>&1 >/dev/null
29 bin/console -c bin/console.conf <<END_OF_DATA
33 label storage=File volume=TestVolume001
34 run job=CompressedTest yes
41 restore where=${cwd}/tmp/bacula-restores
43 <${cwd}/tmp/restore-list
51 bin/bacula stop 2>&1 >/dev/null
52 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
54 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
56 diff -r tmp/build tmp/bacula-restores${cwd}/tmp/build 2>&1 >/dev/null
57 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
60 echo " !!!!! restore-by-file-test Bacula source failed!!! !!!!! "
61 echo " !!!!! restore-by-file-test failed!!! !!!!! " >>test.out
64 echo " ===== restore-by-file-test Bacula source OK ===== "
65 echo " ===== restore-by-file-test OK ===== " >>test.out