3 # Run a simple backup of the Bacula build directory
4 # to a tape then restore it, we do that twice to ensure that
5 # we can correctly append to a tape.
8 bin/bacula stop 2>&1 >/dev/null
9 scripts/copy-tape-confs
11 echo "${cwd}/build" >/tmp/file-list
12 bin/drop_sqlite_tables
13 bin/make_sqlite_tables
17 echo " === Starting Bacula tape test ==="
18 echo " === Starting Bacula tape test ===" >>working/log
21 bin/bacula start 2>&1 >/dev/null
22 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
26 label storage=DDS-4 volume=TestVolume001 slot=0
27 run job=NightlySave yes
34 restore where=${cwd}/tmp/bacula-restores select all
39 @# Now do a second backup
44 label storage=DDS-4 volume=TestVolume001 slot=0
45 run job=NightlySave yes
49 @# now do a second restore
52 restore where=${cwd}/tmp/bacula-restores select all
59 bin/bacula stop 2>&1 >/dev/null
60 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
62 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
64 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
65 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
68 echo " !!!!! Bacula tape test Bacula source failed!!! !!!!! "
69 echo " !!!!! Bacula tape test failed!!! !!!!! " >>test.out
72 echo " ===== Bacula tape test Bacula source OK ===== "
73 echo " ===== Bacula tape test OK ===== " >>test.out