3 # Run a simple backup of the Bacula build directory then create some
4 # new files, do an Incremental onto a different medium
5 # and then restore everything.
7 # This script uses the virtual disk autochanger
9 TestName="incremental-2media"
15 scripts/copy-2disk-confs
16 scripts/prepare-disk-changer
17 echo "${cwd}/build" >${cwd}/tmp/file-list
19 change_jobname $JobName
22 # Write out bconsole commands
23 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
26 @$out ${cwd}/tmp/log1.out
27 label storage=tape volume=TestVolume001 slot=1 Pool=Default drive=0
28 label storage=File volume=TestVolume002 Pool=Default
38 # make some files for the incremental to pick up
39 touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
40 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
42 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
45 @$out ${cwd}/tmp/log1.out
46 @# Force Incremental on the second Volume
47 update volume=TestVolume001 VolStatus=Used
48 setdebug level=51 storage=File
49 run level=Incremental job=$JobName storage=File yes
55 @$out ${cwd}/tmp/log2.out
56 setdebug level=151 storage=tape
57 restore where=${cwd}/tmp/bacula-restores select all done
60 restore where=${cwd}/tmp/bacula-restores select all done
70 check_for_zombie_jobs storage=File