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 using the compressed option
12 TestName="restore-by-file-test"
17 scripts/copy-test-confs
18 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
19 mkdir -p ${cwd}/tmp/build
20 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
24 sed s%\^%${cwd}/tmp/build/% 1 | sort | uniq >restore-list
28 change_jobname CompressedTest $JobName
31 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
34 @$out ${cwd}/tmp/log1.out
35 label storage=File volume=TestVolume001
40 @# now run 10 restores
42 @$out ${cwd}/tmp/log2.out
43 restore where=${cwd}/tmp/bacula-restores storage=File
45 <${cwd}/tmp/restore-list
49 restore where=${cwd}/tmp/bacula-restores storage=File
51 <${cwd}/tmp/restore-list
55 restore where=${cwd}/tmp/bacula-restores storage=File
57 <${cwd}/tmp/restore-list
61 restore where=${cwd}/tmp/bacula-restores storage=File
63 <${cwd}/tmp/restore-list
67 restore where=${cwd}/tmp/bacula-restores storage=File
69 <${cwd}/tmp/restore-list
73 restore where=${cwd}/tmp/bacula-restores storage=File
75 <${cwd}/tmp/restore-list
79 restore where=${cwd}/tmp/bacula-restores storage=File
81 <${cwd}/tmp/restore-list
85 restore where=${cwd}/tmp/bacula-restores storage=File
87 <${cwd}/tmp/restore-list
91 restore where=${cwd}/tmp/bacula-restores storage=File
93 <${cwd}/tmp/restore-list
97 restore where=${cwd}/tmp/bacula-restores storage=File
99 <${cwd}/tmp/restore-list
103 restore where=${cwd}/tmp/bacula-restores storage=File
105 <${cwd}/tmp/restore-list
114 check_for_zombie_jobs storage=File
118 check_restore_tmp_build_diff