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
13 echo "${cwd}/tmp/build" >/tmp/file-list
14 mkdir ${cwd}/tmp/build
15 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
17 echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list
18 echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list
23 cat <<END_OF_DATA >tmp/bconcmds
27 label storage=File volume=TestVolume002
28 label storage=File volume=TestVolume001
29 run job=CompressedTest yes
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 >tmp/bconcmds
45 @# Force differential on the second Volume
46 update volume=TestVolume002 VolStatus=Used
47 run level=differential job=CompressedTest yes
55 scripts/check_for_zombie_jobs storage=File
56 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
58 cat <<END_OF_DATA >tmp/bconcmds
62 run level=incremental job=CompressedTest yes
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
86 check_restore_tmp_build_diff