]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/backup-bacula-tape
Add changes
[bacula/bacula] / regress / tests / backup-bacula-tape
index 295ebf5a274924935cffcfa2982e23044ca3ae86..7b6a0bebfa246c8c3428ed4454c42b6d91fa04e3 100755 (executable)
@@ -5,43 +5,80 @@
 #   we can correctly append to a tape.
 #
 cwd=`pwd`
-bin/bacula stop  2>&1 >/dev/null
 scripts/copy-tape-confs
 scripts/cleanup-tape
+
 echo "${cwd}/build" >/tmp/file-list
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
 
 echo " "
 echo " "
-echo " === Starting Bacula tape test ==="
-echo " === Starting Bacula tape test ===" >>working/log
+echo " === Starting Backup Bacula tape test at `date +%R:%S` ==="
+echo " === Starting Backup Bacula tape test at `date +%R:%S` ===" >>working/log
 echo " "
 
 bin/bacula start 2>&1 >/dev/null
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
+bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
 @output /dev/null
 messages
 @output tmp/log1.out
 label storage=DDS-4 volume=TestVolume001 slot=0
+purge volume=TestVolume001
+relabel pool=Default storage=DDS-4 oldVolume=TestVolume001 volume=TestVolume002 slot=0
+purge volume=TestVolume002
+relabel pool=Default storage=DDS-4 oldVolume=TestVolume002 volume=TestVolume001 slot=0
 run job=NightlySave yes
+status storage=DDS-4
+status storage=DDS-4
+status storage=DDS-4
+status storage=DDS-4
+status storage=DDS-4
+status storage=DDS-4
+sleep 1
+status storage=DDS-4
+status storage=DDS-4
+status storage=DDS-4
+status storage=DDS-4
+status storage=DDS-4
+sleep 1
+status storage=DDS-4
+status storage=DDS-4
+status storage=DDS-4
+status storage=DDS-4
+status storage=DDS-4
+sleep 1
+status storage=DDS-4
+status storage=DDS-4
+status storage=DDS-4
+status storage=DDS-4
+status storage=DDS-4
+sleep 1
+status storage=DDS-4
+status storage=DDS-4
+status storage=DDS-4
+status storage=DDS-4
+status storage=DDS-4
 wait
 messages
 @# 
 @# now do a restore
 @#
 @output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select all
+restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
 yes
 wait
 messages
-@#
-@# Now do a second backup
-@#
+END_OF_DATA
+bin/bacula stop 2>&1 >/dev/null
+#
+# Now do a second backup after making a few changes
+#
+touch ${cwd}/build/src/dird/*.c
+echo "test test" > ${cwd}/build/src/dird/xxx
+bin/bacula start 2>&1 >/dev/null
+bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
 @output /dev/null
 messages
 @output tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0
 run job=NightlySave yes
 wait
 messages
@@ -49,27 +86,29 @@ messages
 @# now do a second restore
 @#
 @output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select all
+restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
 yes
 wait
 messages
 @output
 quit
 END_OF_DATA
+scripts/check_for_zombie_jobs storage=DDS-4
+
 bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
+grep "^  Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
 bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
+grep "^  Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
 rstat=$?
 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
    echo " "
    echo " "
-   echo "  !!!!! Bacula tape test Bacula source failed!!! !!!!! "
-   echo "  !!!!! Bacula tape test failed!!! !!!!! " >>test.out
+   echo "  !!!!! Backup Bacula tape test failed!!! !!!!! "
+   echo "  !!!!! Backup Bacula tape test failed!!! !!!!! " >>test.out
    echo " "
 else
-   echo "  ===== Bacula tape test Bacula source OK ===== "
-   echo "  ===== Bacula tape test OK ===== " >>test.out
+   echo "  ===== Backup Bacula tape test OK ===== "
+   echo "  ===== Backup Bacula tape test OK ===== " >>test.out
    scripts/cleanup
 fi