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 TestName="incremental-tape"
12 scripts/copy-tape-confs
15 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
16 if test ! -d ${cwd}/tmp/build ; then
17 mkdir -p ${cwd}/tmp/build
19 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
21 echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list
22 echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list
25 change_jobname NightlySave $JobName
28 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
31 @$out ${cwd}/tmp/log1.out
32 label storage=tape volume=TestVolume001 slot=0 pool=Default
40 check_for_zombie_jobs storage=tape
42 echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
43 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
45 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
48 @$out ${cwd}/tmp/log1.out
49 run level=Incremental job=$JobName yes
55 @$out ${cwd}/tmp/log2.out
56 restore where=${cwd}/tmp/bacula-restores storage=tape
58 <${cwd}/tmp/restore-list
67 check_for_zombie_jobs storage=tape
71 # Delete .c files because we will only restored the txt files
73 rm -f ${cwd}/tmp/build/*.c
76 check_restore_tmp_build_diff