X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=regress%2Ftests%2Fvirtual-backup-test;h=69f1fb69fd8f14ce05f654f777a361b47043001b;hb=7d5eacc922052324417c82382d6a18e8054245e8;hp=d9872a0d639e5b9d4e3fc3d9e3d2e43f740df488;hpb=daa1b94113d1eddbfd1dcf10e0fd376045ea4974;p=bacula%2Fbacula diff --git a/regress/tests/virtual-backup-test b/regress/tests/virtual-backup-test index d9872a0d63..69f1fb69fd 100755 --- a/regress/tests/virtual-backup-test +++ b/regress/tests/virtual-backup-test @@ -1,9 +1,9 @@ #!/bin/sh # -# Run a simple backup of the Bacula build directory then do a virtual -# backup to another device. +# Run a simple backup of the Bacula build directory then do a +# Virtual Full backup to another device. # -# This script uses the virtual disk autochanger +# This script uses the disk autochanger # TestName="virtual-backup-test" JobName=Vbackup @@ -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,31 +49,42 @@ 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 messages list jobs list volumes +@# +@# now do a normal restore of normal backups +@# +setdebug level=10 dir +restore where=${cwd}/tmp/bacula-restores select +unmark * +mark * +done +yes +list volumes +@# should Consolidate Full, Differential and Incremental +setdebug level=150 storage=DiskChanger setdebug level=100 dir -@# should migrate two jobs -@#setdebug level=51 storage=DiskChanger 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 restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger unmark * mark * done yes -list volumes wait +list volumes +list jobs messages @output quit @@ -82,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