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
13 ./drop_bacula_tables >/dev/null 2>&1
14 ./make_bacula_tables >/dev/null 2>&1
15 ./grant_bacula_privileges 2>&1 >/dev/null
20 echo " === Starting Bacula tape test ==="
21 echo " === Starting Bacula tape test ===" >>working/log
24 bin/bacula start 2>&1 >/dev/null
25 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
29 label storage=DDS-4 volume=TestVolume001 slot=0
30 run job=NightlySave yes
37 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4
42 @# Now do a second backup
47 label storage=DDS-4 volume=TestVolume001 slot=0
48 run job=NightlySave yes
52 @# now do a second restore
55 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4
62 bin/bacula stop 2>&1 >/dev/null
63 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
65 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
67 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
68 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
71 echo " !!!!! Bacula tape test Bacula source failed!!! !!!!! "
72 echo " !!!!! Bacula tape test failed!!! !!!!! " >>test.out
75 echo " ===== Bacula tape test Bacula source OK ===== "
76 echo " ===== Bacula tape test OK ===== " >>test.out