]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/migration-volume-test
Use the full file list now that the regression test passes
[bacula/bacula] / regress / tests / migration-volume-test
index 9aa0b5e5e483151b2d6531c50f02cc7f10798150..3e54ad098bfbd8c187153dec961955f25b0ed249 100755 (executable)
@@ -1,21 +1,23 @@
 #!/bin/sh
 #
-# Run a simple backup of the Bacula build directory then migrate it
-#   to another device.
+# Run a backup of the Bacula build directory on two Volumes
+#   then migrate it to another device.             
 #
 # This script uses the virtual disk autochanger
 #
 TestName="migration-volume-test"
 JobName=MigVolBackup
 . scripts/functions
-set_debug 1
+set_debug 
 
 . config.out
 
+scripts/cleanup
 scripts/copy-migration-confs
 scripts/prepare-two-disks
-scripts/cleanup
 echo "${cwd}/build" >/tmp/file-list
+#cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
+#sed "s%# Maximum File Size%  Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
 
 change_jobname NightlySave $JobName
 start_test
@@ -32,25 +34,26 @@ cat <<END_OF_DATA >tmp/bconcmds
 messages
 @$out tmp/log1.out
 label storage=File volume=FileVolume001 Pool=Default
+label storage=File volume=FileVolume002 Pool=Default
+update Volume=FileVolume001 MaxVolBytes=3000000 pool=Default
 label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
 label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
 list volumes
-@# run two jobs (both will be migrated)
+@# 
 run job=$JobName yes
 wait
 run job=$JobName yes
-@sleep 1
-status storage=File       
-@sleep 1
-status storage=File
-@sleep 1
-status storage=File
 wait
 update volume=FileVolume001 VolStatus=Used
+update volume=FileVolume002 VolStatus=Used
 list volumes
 @# should migrate two jobs
+@# setdebug level=11 dir
+@echo "Run migrate-volume Job"
+@#setdebug level=100 dir
 run job=migrate-volume yes
 list volumes
+list jobs
 @sleep 3
 status storage=DiskChanger
 @sleep 1
@@ -58,6 +61,14 @@ status storage=DiskChanger
 @sleep 1
 status storage=DiskChanger
 wait
+list jobs
+sql
+select * from JobMedia where JobId=1;
+
+@# ensure we don't pickup old backup by purging volume
+purge volume=FileVolume001
+purge volume=FileVolume002
+@echo "Now do a restore"
 messages
 @# 
 @# now do a restore