3 # Run a simple backup of the Bacula build directory
4 # to a tape then restore it.
7 bin/bacula stop 2>&1 >/dev/null
8 scripts/copy-tape-confs
10 echo "${cwd}/build" >/tmp/file-list
11 bin/drop_sqlite_tables
12 bin/make_sqlite_tables
16 echo " === Starting Bacula tape test ==="
17 echo " === Starting Bacula tape test ===" >>working/log
20 bin/bacula start 2>&1 >/dev/null
21 bin/console -c bin/console.conf <<END_OF_DATA
25 label storage=DDS-4 volume=TestVolume001 slot=0
26 run job=NightlySave yes
40 bin/bacula stop 2>&1 >/dev/null
41 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
43 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
45 diff -r build /tmp/bacula-restores${cwd}/build
46 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
49 echo " !!!!! Bacula tape test Bacula source failed!!! !!!!! "
50 echo " !!!!! Bacula tape test failed!!! !!!!! " >>test.out
53 echo " ===== Bacula tape test Bacula source OK ===== "
54 echo " ===== Bacula tape test OK ===== " >>test.out