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 two different tape drives.
9 TestName="incremental-2media-tape"
18 /bin/cp -f scripts/bacula-dir-2d.conf bin/bacula-dir.conf
19 /bin/cp -f scripts/bacula-sd-2d.conf bin/bacula-sd.conf
20 /bin/cp -f scripts/bacula-fd-2d.conf bin/bacula-fd.conf
21 /bin/cp -f scripts/bconsole-2d.conf bin/bconsole.conf
23 # get proper SD tape definitions
24 cp -f scripts/linux_tape_options bin/tape_options
25 if test x`uname` = xFreeBSD ; then
26 cp -f scripts/freebsd_tape_options bin/tape_options
29 mt -f /dev/nst0 rewind
31 mt -f /dev/nst1 rewind
34 echo "${cwd}/build" >${cwd}/tmp/file-list
36 change_jobname $JobName
39 # Write out bconsole commands
40 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
43 @$out ${cwd}/tmp/log1.out
44 label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
45 label storage=DLT80 volume=TestVolume002 Pool=Default
55 # make some files for the incremental to pick up
56 touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
57 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
59 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
62 @$out ${cwd}/tmp/log1.out
63 @# Force Incremental on the second Volume
64 update volume=TestVolume001 VolStatus=Used
65 setdebug level=51 storage=DLT80
66 run level=Incremental job=$JobName storage=DLT80 yes
73 @$out ${cwd}/tmp/log2.out
74 setdebug level=51 storage=DDS-4
75 restore where=${cwd}/tmp/bacula-restores select all done
85 check_for_zombie_jobs storage=DLT80