3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # Run a simple backup of the Bacula build directory then create some
9 # new files, do an Incremental and restore those two files.
11 TestName="incremental-tape"
17 scripts/copy-tape-confs
20 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
21 if test ! -d ${cwd}/tmp/build ; then
22 mkdir -p ${cwd}/tmp/build
24 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
26 echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list
27 echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list
30 change_jobname NightlySave $JobName
33 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
36 @$out ${cwd}/tmp/log1.out
37 label storage=tape volume=TestVolume001 slot=0 pool=Default
45 check_for_zombie_jobs storage=tape
47 echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
48 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
50 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
53 @$out ${cwd}/tmp/log1.out
54 run level=Incremental job=$JobName yes
60 @$out ${cwd}/tmp/log2.out
61 restore where=${cwd}/tmp/bacula-restores storage=tape
63 <${cwd}/tmp/restore-list
72 check_for_zombie_jobs storage=tape
76 # Delete .c files because we will only restored the txt files
78 rm -f ${cwd}/tmp/build/*.c
81 check_restore_tmp_build_diff