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"
16 /bin/cp -f scripts/bacula-dir-2d.conf bin/bacula-dir.conf
17 /bin/cp -f scripts/bacula-sd-2d.conf bin/bacula-sd.conf
18 /bin/cp -f scripts/bacula-fd-2d.conf bin/bacula-fd.conf
19 /bin/cp -f scripts/bconsole-2d.conf bin/bconsole.conf
21 # get proper SD tape definitions
22 cp -f scripts/linux_tape_options bin/tape_options
23 if test x`uname` = xFreeBSD ; then
24 cp -f scripts/freebsd_tape_options bin/tape_options
27 mt -f /dev/nst0 rewind
29 mt -f /dev/nst1 rewind
32 echo "${cwd}/build" >${cwd}/tmp/file-list
34 change_jobname $JobName
37 # Write out bconsole commands
38 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
41 @$out ${cwd}/tmp/log1.out
42 label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
43 label storage=DLT80 volume=TestVolume002 Pool=Default
53 # make some files for the incremental to pick up
54 touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
55 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
57 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
60 @$out ${cwd}/tmp/log1.out
61 @# Force Incremental on the second Volume
62 update volume=TestVolume001 VolStatus=Used
63 setdebug level=51 storage=DLT80
64 run level=Incremental job=$JobName storage=DLT80 yes
71 @$out ${cwd}/tmp/log2.out
72 setdebug level=51 storage=DDS-4
73 restore where=${cwd}/tmp/bacula-restores select all done
83 check_for_zombie_jobs storage=DLT80