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"
16 scripts/copy-2disk-confs
17 scripts/prepare-two-disks
18 echo "${cwd}/build" >/tmp/file-list
20 change_jobname $JobName
23 # Write out bconsole commands
24 cat <<END_OF_DATA >tmp/bconcmds
28 label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
29 label storage=File volume=TestVolume002 Pool=Default
39 # make some files for the incremental to pick up
40 touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
41 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
43 cat <<END_OF_DATA >tmp/bconcmds
47 @# Force Incremental on the second Volume
48 update volume=TestVolume001 VolStatus=Used
49 setdebug level=51 storage=File
50 run level=Incremental job=$JobName storage=File yes
57 setdebug level=51 storage=DDS-4
58 restore where=${cwd}/tmp/bacula-restores select all done
68 check_for_zombie_jobs storage=File