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 create some
9 # new files, do an Incremental onto a different medium
10 # and then restore everything.
12 # This script uses the virtual disk autochanger
14 TestName="incremental-2media"
20 scripts/copy-2disk-confs
21 scripts/prepare-disk-changer
22 echo "${cwd}/build" >${cwd}/tmp/file-list
24 change_jobname $JobName
27 # Write out bconsole commands
28 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
31 @$out ${cwd}/tmp/log1.out
32 label storage=tape volume=TestVolume001 slot=1 Pool=Default drive=0
33 label storage=File volume=TestVolume002 Pool=Default
43 # make some files for the incremental to pick up
44 touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
45 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
47 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
50 @$out ${cwd}/tmp/log1.out
51 @# Force Incremental on the second Volume
52 update volume=TestVolume001 VolStatus=Used
53 setdebug level=51 storage=File
54 run level=Incremental job=$JobName storage=File yes
60 @$out ${cwd}/tmp/log2.out
61 setdebug level=151 storage=tape
62 restore where=${cwd}/tmp/bacula-restores select all done
65 restore where=${cwd}/tmp/bacula-restores select all done
75 check_for_zombie_jobs storage=File