3 # Run a simple backup of the Bacula build directory then create some
4 # new files, do a Differental then a bunch of query commands
5 # and finally restore the two files.
12 scripts/copy-test-confs
13 echo "${cwd}/tmp/build" >${cwd}/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
21 change_jobname CompressedTest $JobName
24 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
27 @$out ${cwd}/tmp/log1.out
28 label storage=File volume=TestVolume001
29 label storage=File volume=TestVolume002
37 check_for_zombie_jobs storage=File
40 echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
41 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
43 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
46 @$out ${cwd}/tmp/log1.out
47 @# Force differental on the second Volume
48 update volume=TestVolume001 VolStatus=Used
49 run level=differental job=$JobName yes
55 check_for_zombie_jobs storage=File
58 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
59 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
62 @$out ${cwd}/tmp/log1.out
63 run level=incremental job=$JobName yes
99 @$out ${cwd}/tmp/log2.out
100 restore where=${cwd}/tmp/bacula-restores storage=File file=<${cwd}/tmp/restore-list
108 check_for_zombie_jobs storage=File
112 # Delete .c files because we will only restored the txt files
114 rm -f ${cwd}/tmp/build/*.c
117 check_restore_tmp_build_diff