3 # Run a simple backup of the Bacula build directory then migrate it
6 # Test copy a job that spans two Volumes
8 # This script uses the virtual disk autochanger
10 TestName="copy-jobspan-test"
11 JobName=CopyJobSpanSave
16 scripts/copy-migration-confs
17 scripts/prepare-disk-changer
18 echo "${cwd}/build" >${cwd}/tmp/file-list
19 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
20 sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
21 sed 's/migrate/copy/g' ${cwd}/bin/bacula-dir.conf > ${cwd}/tmp/1
22 sed 's/Migrate/Copy/g' ${cwd}/tmp/1 > ${cwd}/bin/bacula-dir.conf
24 change_jobname NightlySave $JobName
28 # Note, we first backup into Pool Default,
29 # then Copy into Pool Full.
30 # Pool Default uses Storage=File
31 # Pool Full uses Storage=DiskChanger
33 # Write out bconsole commands
34 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
37 @$out ${cwd}/tmp/log1.out
38 @#setdebug level=10 dir
39 @#setdebug level=100 storage=File
40 label storage=File volume=FileVolume001 Pool=Default
41 label storage=File volume=FileVolume002 Pool=Default
42 update Volume=FileVolume001 MaxVolBytes=3000000 pool=Default
43 label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
44 label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
48 @#run job=$JobName yes
51 @#setdebug level=200 dir
52 @# should migrate both Volumes
55 purge volume=FileVolume001
56 purge volume=FileVolume002
64 @$out ${cwd}/tmp/log2.out
65 restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
76 check_for_zombie_jobs storage=File