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.
9 # Query test no longer works because the query file is empty
22 scripts/copy-test-confs
23 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
24 mkdir -p ${cwd}/tmp/build
25 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
27 echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list
28 echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list
31 change_jobname CompressedTest $JobName
34 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
37 @$out ${cwd}/tmp/log1.out
38 label storage=File volume=TestVolume001
39 label storage=File volume=TestVolume002
47 check_for_zombie_jobs storage=File
50 echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
51 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
53 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
56 @$out ${cwd}/tmp/log1.out
57 @# Force differental on the second Volume
58 update volume=TestVolume001 VolStatus=Used
59 run level=differential job=$JobName yes
65 check_for_zombie_jobs storage=File
68 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
69 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
72 @$out ${cwd}/tmp/log1.out
73 run level=incremental job=$JobName yes
109 @$out ${cwd}/tmp/log2.out
110 restore where=${cwd}/tmp/bacula-restores storage=File file=<${cwd}/tmp/restore-list
118 check_for_zombie_jobs storage=File
122 # Delete .c files because we will only restored the txt files
124 rm -f ${cwd}/tmp/build/*.c
127 check_restore_tmp_build_diff