]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/backup-bacula-tape
Final changes
[bacula/bacula] / regress / tests / backup-bacula-tape
index f83fa5b62554d0a837c3db525de792f86874f633..ac2df5d89d559543cdd1ea347b68c33e5cca1866 100755 (executable)
@@ -1,15 +1,19 @@
 #!/bin/sh
 #
 # Run a simple backup of the Bacula build directory 
-#   to a tape then restore it.
+#   to a tape then restore it, we do that twice to ensure that
+#   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
+cd bin
+./drop_bacula_tables >/dev/null 2>&1
+./make_bacula_tables >/dev/null 2>&1
+./grant_bacula_privileges 2>&1 >/dev/null
+cd ..
 
 echo " "
 echo " "
@@ -30,13 +34,32 @@ 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
+@#
+@output /dev/null
+messages
+@output tmp/log1.out
+label storage=DDS-4 volume=TestVolume001 slot=0
+run job=NightlySave yes
+wait
+messages
+@# 
+@# now do a second restore
+@#
+@output tmp/log2.out
+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
 bstat=$?