3 # Run a simple backup of the Bacula build directory then create some
4 # new files, do an Incremental and restore those two files.
6 # This script uses the virtual disk autochanger
8 TestName="incremental-2disk-test"
17 ./drop_bacula_tables >/dev/null 2>&1
18 ./make_bacula_tables >/dev/null 2>&1
19 ./grant_bacula_privileges 2>&1 >/dev/null
22 scripts/copy-2disk-confs
23 scripts/prepare-two-disks
25 echo "${cwd}/tmp/build" >/tmp/file-list
26 if test ! -d ${cwd}/tmp/build ; then
27 mkdir ${cwd}/tmp/build
29 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
31 echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list
32 echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list
35 change_jobname $JobName
38 # Write out bconsole commands
39 cat <<END_OF_DATA >tmp/bconcmds
43 label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
44 label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Default drive=0
53 echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
54 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
57 cat <<END_OF_DATA >tmp/bconcmds
61 @# Force Incremental on the second Volume
62 update volume=TestVolume001 VolStatus=Used
63 run level=Incremental job=$JobName yes
70 restore where=${cwd}/tmp/bacula-restores
72 <${cwd}/tmp/restore-list
83 check_for_zombie_jobs storage=File
86 # Delete .c files because we will only restored the txt files
91 check_restore_tmp_build_diff