]> git.sur5r.net Git - bacula/bacula/commitdiff
Add a Verify Volume tape test
authorKern Sibbald <kern@sibbald.com>
Sun, 15 Oct 2006 08:41:03 +0000 (08:41 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 15 Oct 2006 08:41:03 +0000 (08:41 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3562 91ce42f0-d328-0410-95d8-f526ca767f89

regress/all-non-root-tape-tests
regress/scripts/bacula-dir-tape.conf.in
regress/tests/verify-vol-tape [new file with mode: 0755]

index 6c42add762058f9fb40fb67a34535bdf56d55016..5e57ebb2df8a6dbc7be0e9e12bf19457fa3ea349 100755 (executable)
@@ -21,6 +21,7 @@ tests/truncate-bug-tape
 tests/two-pool-tape
 tests/2drive-incremental-2tape
 tests/bscan-tape
+tests/verify-vol-tape
 echo " "
 echo " "
 echo "Test results"
index ca90370c553a4149e26bba75246d8e407a123467..02321c18b06bafb12675fe1c51fa7aff7aec3b71 100644 (file)
@@ -69,6 +69,23 @@ Job {
 # Prefer Mounted Volumes = no
 }
 
+Job {
+  Name = "VerifyTape"
+  Type = Verify
+  Level = VolumeToCatalog
+  Client=@hostname@-fd 
+  FileSet="Verify Set"
+  Storage = DDS-4
+  Messages = Standard
+  Pool = Default
+  Write Bootstrap = "@working_dir@/NightlySave.bsr"
+  Maximum Concurrent Jobs = 4
+  SpoolData = yes
+# Prefer Mounted Volumes = no
+}
+
+
+
 
 # Standard Restore template, to be changed by Console program
 Job {
@@ -91,6 +108,18 @@ FileSet {
   }
 }
 
+FileSet {
+  Name = "Verify Set"
+  Include { 
+    Options { 
+       signature=MD5
+       verify=pins1
+    }
+    File =  </tmp/file-list
+  }
+}
+
+
 
 #
 # When to do the backups, full backup on first sunday of the month,
diff --git a/regress/tests/verify-vol-tape b/regress/tests/verify-vol-tape
new file mode 100755 (executable)
index 0000000..f1ec9c2
--- /dev/null
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# Run a simple backup of the Bacula build directory
+#   then verify the catalog.           
+#
+TestName="verify-vol-tape"
+JobName=VerifyVol
+. scripts/functions
+set_debug 1
+
+copy_tape_confs
+
+echo "${cwd}/build" >/tmp/file-list
+
+change_jobname NightlySave $JobName
+start_test
+
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
+messages
+@$out tmp/log1.out
+setdebug level=1 storage=DDS-4 sd
+label storage=DDS-4 volume=TestVolume001 pool=Default
+run job=$JobName yes
+wait
+messages
+@# 
+@# now do a verify volume
+@#
+@$out ${cwd}/tmp/original
+run job=VerifyTape pool=Default
+yes
+wait
+messages
+@$out
+quit
+END_OF_DATA
+
+run_bacula
+
+sleep 2
+check_for_zombie_jobs storage=DDS-4
+stop_bacula
+
+grep "^  Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
+bstat=$?
+grep "^  Termination: *Verify OK" ${cwd}/tmp/original 2>&1 >/dev/null
+rstat=$?
+dstat=0
+end_test