]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/migration-job-test
ebl fix shell case..esac default condition
[bacula/bacula] / regress / tests / migration-job-test
index b9be5fdd8f4853a63a35600e865ea4bfbd66065e..ac0ea2b979183f8ed5b3a2e2d46cc745853a3459 100755 (executable)
@@ -8,14 +8,12 @@
 TestName="migration-job-test"
 JobName=MigrationJobSave
 . scripts/functions
-set_debug 0
 
-. config.out
 
+scripts/cleanup
 scripts/copy-migration-confs
 scripts/prepare-two-disks
-scripts/cleanup
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
 
 change_jobname NightlySave $JobName
 start_test
@@ -27,34 +25,51 @@ start_test
 #              Pool Full    uses Storage=DiskChanger
 
 # Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
 @output
 messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
+setdebug level=100 storage=File
 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
-list volumes
 @# run two jobs (both will be migrated)
 run job=$JobName yes
 run job=$JobName yes
 wait
+list jobs
 list volumes
+@#setdebug level=100 dir
 @# should migrate two jobs
-run job=migrate yes
-list volumes
+@#setdebug level=51 storage=DiskChanger
+run job=migrate-job yes
 wait
 messages
+@# purge volume=FileVolume001
+list jobs 
+list volumes
 wait
+@#
+@# Now do another backup, but level Incremental
+@#
+run job=$JobName level=Incremental yes
+wait
+messages
+@#
+@# This final job that runs should be Incremental and
+@# not upgraded to full.
+list jobs
 @# 
 @# now do a restore
 @#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
+list volumes 
 restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
 unmark *
 mark *
 done
 yes
+list volumes
 wait
 messages
 @output