3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # Run a simple backup of the Bacula build directory then create some
9 # new files, do a Differental then a bunch of query commands
10 # and finally restore the two files.
14 # Query test no longer works because the query file is empty
27 scripts/copy-test-confs
28 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
29 mkdir -p ${cwd}/tmp/build
30 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
32 echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list
33 echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list
36 change_jobname CompressedTest $JobName
39 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
42 @$out ${cwd}/tmp/log1.out
43 label storage=File volume=TestVolume001
44 label storage=File volume=TestVolume002
52 check_for_zombie_jobs storage=File
55 echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
56 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
58 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
61 @$out ${cwd}/tmp/log1.out
62 @# Force differental on the second Volume
63 update volume=TestVolume001 VolStatus=Used
64 run level=differential job=$JobName yes
70 check_for_zombie_jobs storage=File
73 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
74 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
77 @$out ${cwd}/tmp/log1.out
78 run level=incremental job=$JobName yes
114 @$out ${cwd}/tmp/log2.out
115 restore where=${cwd}/tmp/bacula-restores storage=File file=<${cwd}/tmp/restore-list
123 check_for_zombie_jobs storage=File
127 # Delete .c files because we will only restored the txt files
129 rm -f ${cwd}/tmp/build/*.c
132 check_restore_tmp_build_diff