]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/virtual-backup-test
updates
[bacula/bacula] / regress / tests / virtual-backup-test
index 1ff14eac499f2b47febebae62c5f97b3cd994a71..d613fe24746c372dacf7700d71c3ea59ee3772bc 100755 (executable)
@@ -12,7 +12,7 @@ JobName=Vbackup
 
 scripts/cleanup
 scripts/copy-migration-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 echo "${cwd}/build" >${cwd}/tmp/file-list
 
 change_jobname NightlySave $JobName
@@ -34,6 +34,7 @@ label storage=File volume=FileVolume001 Pool=Default
 label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
 label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
 @# run several jobs
+@exec "sh -c 'date > ${cwd}/build/date'"
 run job=$JobName level=Full yes
 wait
 messages
@@ -48,6 +49,7 @@ run job=$JobName level=Differential yes
 wait
 messages
 list jobs
+@exec "sh -c 'date > ${cwd}/build/date'"
 @exec "sh -c 'touch ${cwd}/build/src/dird/*.o'"
 run job=$JobName level=Incremental yes
 wait
@@ -55,57 +57,26 @@ messages
 list jobs
 list volumes
 @# 
-@# now do a restore
+@# now do a normal restore of normal backups
 @#
-@$out ${cwd}/tmp/log2.out
+setdebug level=10 dir
 restore where=${cwd}/tmp/bacula-restores select
 unmark *
 mark *
 done
 yes
 list volumes
-@#setdebug level=100 dir
 @# should Consolidate Full, Differential and Incremental
-@#setdebug level=51 storage=DiskChanger
-run job=$JobName level=VirtualFull yes
-wait
-messages
-list volumes
-list jobs
-@# 
-@# now do a restore
-@#
-@$out ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
-unmark *
-mark *
-done
-yes
-wait
-update Volume=ChangerVolume002
-11
-Default
-list volumes
-list jobs
-messages
-@exec "sh -c 'touch ${cwd}/build/src/dird/*.o'"
-run job=$JobName level=Incremental yes
-wait
-messages
-list jobs
-list volumes
-@# Now do another Consolidation
 setdebug level=150 storage=DiskChanger
+setdebug level=100 dir
 run job=$JobName level=VirtualFull yes
 wait
 messages
 list volumes
 list jobs
 @# 
-@# now do a restore
+@# now do a restore of the consolidated Full
 @#
-@$out ${cwd}/tmp/log2.out
-setdebug level=0 storage=DiskChanger
 restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
 unmark *
 mark *
@@ -123,6 +94,11 @@ run_bacula
 check_for_zombie_jobs storage=File
 stop_bacula
 
+#
+# We only used one log so copy it to the second log
+#  so that any restore errors will be picked up
+#
+cp -f ${cwd}/tmp/log1.out ${cwd}/tmp/log2.out
 check_two_logs
 check_restore_diff
 end_test