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
42 # make some files for the incremental to pick up
43 touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
44 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
46 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
49 @$out ${cwd}/tmp/log1.out
50 @# Force Incremental on the second Volume
51 update volume=TestVolume001 VolStatus=Used
52 setdebug level=51 storage=File
53 run level=Incremental job=$JobName storage=File yes
59 @$out ${cwd}/tmp/log2.out
60 setdebug level=151 storage=tape
61 restore where=${cwd}/tmp/bacula-restores select all done
64 restore where=${cwd}/tmp/bacula-restores select all done
74 check_for_zombie_jobs storage=File