]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/migration-volume-test
Updates
[bacula/bacula] / regress / tests / migration-volume-test
index e2d66b60daa5ccf7fbbac8b303fa647e28c973b1..bdcc87fcab6f56b9baba5108c4608d5604f6015d 100755 (executable)
@@ -8,7 +8,7 @@
 TestName="migration-volume-test"
 JobName=MigVolBackup
 . scripts/functions
-set_debug 0
+set_debug 0 
 
 . config.out
 
@@ -38,7 +38,6 @@ 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 job=$JobName yes
 wait
@@ -46,18 +45,40 @@ run job=$JobName yes
 wait
 update volume=FileVolume001 VolStatus=Used
 update volume=FileVolume002 VolStatus=Used
-list volumes
+@#list volumes
+@#list jobs
 @# should migrate two jobs
 @# setdebug level=11 dir
+@echo "Run migrate-volume Job"
+@#setdebug level=100 dir
 run job=migrate-volume yes
-list volumes
-@sleep 3
-status storage=DiskChanger
-@sleep 1
-status storage=DiskChanger
-@sleep 1
+@sleep 5 
+list jobs
+llist jobid=1
+llist jobid=2
+llist jobid=3
+llist jobid=4
+llist jobid=5
 status storage=DiskChanger
 wait
+list volumes
+list jobs
+llist jobid=1
+llist jobid=2
+llist jobid=3
+llist jobid=4
+llist jobid=5
+sql
+select * from JobMedia where JobId=1;
+
+@# Now run a second Migration job, which should do nothing
+run job=migrate-volume yes
+wait
+list jobs
+@# 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
@@ -78,6 +99,8 @@ run_bacula
 check_for_zombie_jobs storage=File
 stop_bacula
 
+exit
+
 check_two_logs
 check_restore_diff
 end_test