3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # Run a simple backup of the Bacula build directory then migrate it
11 # Test migrating a job that spans two Volumes
13 # This script uses the virtual disk autochanger
15 TestName="migration-jobspan-test"
16 JobName=MigrationJobSpanSave
21 scripts/copy-migration-confs
22 scripts/prepare-disk-changer
23 echo "${cwd}/build" >${cwd}/tmp/file-list
24 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
25 sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
28 change_jobname NightlySave $JobName
32 # Note, we first backup into Pool Default,
33 # then Migrate into Pool Full.
34 # Pool Default uses Storage=File
35 # Pool Full uses Storage=DiskChanger
37 # Write out bconsole commands
38 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
41 @$out ${cwd}/tmp/log1.out
42 @#setdebug level=10 dir
43 @#setdebug level=100 storage=File
44 label storage=File volume=FileVolume001 Pool=Default
45 label storage=File volume=FileVolume002 Pool=Default
46 update Volume=FileVolume001 MaxVolBytes=3000000 pool=Default
47 label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
48 label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
52 @#run job=$JobName yes
55 @#setdebug level=200 dir
56 @# should migrate both Volumes
57 run job=migrate-job yes
59 purge volume=FileVolume001
60 purge volume=FileVolume002
68 @$out ${cwd}/tmp/log2.out
69 setdebug level=500 storage=File
70 restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
81 check_for_zombie_jobs storage=File