3 # Run a simple backup of the Bacula build directory then create some
4 # new files, do a differential and restore those two files.
6 TestName="differential-test"
11 scripts/copy-test-confs
12 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
13 mkdir ${cwd}/tmp/build
14 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
16 echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list
17 echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list
20 change_jobname CompressedTest $JobName
23 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
26 @$out ${cwd}/tmp/log1.out
27 label storage=File volume=TestVolume002
28 label storage=File volume=TestVolume001
37 scripts/check_for_zombie_jobs storage=File
38 echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
39 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
41 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
44 @$out ${cwd}/tmp/log1.out
45 @# Force differential on the second Volume
46 update volume=TestVolume002 VolStatus=Used
47 run level=differential job=$JobName yes
55 scripts/check_for_zombie_jobs storage=File
56 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
58 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
61 @$out ${cwd}/tmp/log1.out
62 run level=incremental job=$JobName yes
68 @$out ${cwd}/tmp/log2.out
69 restore where=${cwd}/tmp/bacula-restores storage=File file=<${cwd}/tmp/restore-list
78 scripts/check_for_zombie_jobs storage=File
83 # Delete .c files because we will only restore the txt files
85 rm -f ${cwd}/tmp/build/*.c
86 check_restore_tmp_build_diff