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 # This script uses the virtual disk autochanger
13 TestName="migration-job-test"
14 JobName=MigrationJobSave
19 scripts/copy-migration-confs
20 scripts/prepare-disk-changer
21 echo "${cwd}/build" >${cwd}/tmp/file-list
23 change_jobname NightlySave $JobName
27 # Note, we first backup into Pool Default,
28 # then Migrate into Pool Full.
29 # Pool Default uses Storage=File
30 # Pool Full uses Storage=DiskChanger
32 # Write out bconsole commands
33 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
36 @$out ${cwd}/tmp/log1.out
37 setdebug level=000 storage=File
38 label storage=File volume=FileVolume001 Pool=Default
39 label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
40 label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
41 @# run two jobs (both will be migrated)
47 @#setdebug level=100 dir
48 @# should migrate two jobs
49 @#setdebug level=51 storage=DiskChanger
50 run job=migrate-job yes
53 @# purge volume=FileVolume001
59 @# Now do another backup, but level Incremental
61 run job=$JobName level=Incremental yes
65 @# This final job that runs should be Incremental and
66 @# not upgraded to full.
71 @$out ${cwd}/tmp/log2.out
73 restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
85 check_for_zombie_jobs storage=File