From 96894476c2920b908cf160e61a2387e1a55a60bb Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 22 Nov 2006 08:18:33 +0000 Subject: [PATCH] Add migration-jobspan-test git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3681 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/tests/migration-jobspan-test | 80 ++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100755 regress/tests/migration-jobspan-test diff --git a/regress/tests/migration-jobspan-test b/regress/tests/migration-jobspan-test new file mode 100755 index 0000000000..838cb00b28 --- /dev/null +++ b/regress/tests/migration-jobspan-test @@ -0,0 +1,80 @@ +#!/bin/sh +# +# Run a simple backup of the Bacula build directory then migrate it +# to another device. +# +# Test migrating a job that spans two Volumes +# +# This script uses the virtual disk autochanger +# +TestName="migration-jobspan-test" +JobName=MigrationJobSpanSave +. scripts/functions +set_debug 0 + +. config.out + +scripts/cleanup +scripts/copy-migration-confs +scripts/prepare-two-disks +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 + +# +# Note, we first backup into Pool Default, +# then Migrate into Pool Full. +# Pool Default uses Storage=File +# Pool Full uses Storage=DiskChanger + +# Write out bconsole commands +cat <tmp/bconcmds +@output +messages +@$out tmp/log1.out +@#setdebug level=100 dir +@#setdebug level=100 storage=File +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 job=$JobName yes +@#run job=$JobName yes +wait +list volumes +@# should migrate both Volumes +run job=migrate-job yes +wait +list volumes +list jobs +messages +wait +@# +@# now do a restore +@# +@$out tmp/log2.out +restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger +unmark * +mark * +done +yes +wait +messages +@output +quit +END_OF_DATA + +run_bacula +check_for_zombie_jobs storage=File +stop_bacula + +check_two_logs +check_restore_diff +end_test -- 2.39.5