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"
12 scripts/copy-test-confs
14 echo "${cwd}/tmp/build" >/tmp/file-list
15 mkdir ${cwd}/tmp/build
16 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
18 echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list
19 echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list
24 cat <<END_OF_DATA >tmp/bconcmds
28 label storage=File volume=TestVolume002
29 label storage=File volume=TestVolume001
30 run job=CompressedTest yes
38 scripts/check_for_zombie_jobs storage=File
39 echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
40 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
42 cat <<END_OF_DATA >tmp/bconcmds
46 @# Force differential on the second Volume
47 update volume=TestVolume002 VolStatus=Used
48 run level=differential job=CompressedTest yes
56 scripts/check_for_zombie_jobs storage=File
57 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
59 cat <<END_OF_DATA >tmp/bconcmds
63 run level=incremental job=CompressedTest yes
70 restore where=${cwd}/tmp/bacula-restores storage=File file=<${cwd}/tmp/restore-list
79 scripts/check_for_zombie_jobs storage=File
84 # Delete .c files because we will only restore the txt files
87 check_restore_tmp_build_diff