]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/restore-by-file-test
Add Allow Duplicate Jobs to copy-uncopied-test regression test for bug #1751
[bacula/bacula] / regress / tests / restore-by-file-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory using the compressed option
4 #   then restore it.
5 #
6
7 TestName="restore-by-file-test"
8 JobName=restorebyfile
9 . scripts/functions
10
11 scripts/cleanup
12 scripts/copy-test-confs
13 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
14 mkdir -p ${cwd}/tmp/build
15 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
16 cd ${cwd}/tmp/build
17 ls >../1
18 cd ..
19 sed s%\^%${cwd}/tmp/build/% 1 | sort | uniq >restore-list
20 rm -f 1
21 cd ${cwd}
22
23 change_jobname CompressedTest $JobName
24 start_test
25
26 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
27 @$out /dev/null
28 messages
29 @$out ${cwd}/tmp/log1.out
30 label storage=File volume=TestVolume001
31 run job=$JobName yes
32 wait
33 messages
34 @# 
35 @# now run 10 restores
36 @#
37 @$out ${cwd}/tmp/log2.out
38 restore where=${cwd}/tmp/bacula-restores storage=File
39 7
40 <${cwd}/tmp/restore-list
41
42 yes
43 wait
44 restore where=${cwd}/tmp/bacula-restores storage=File
45 7
46 <${cwd}/tmp/restore-list
47
48 yes
49 wait
50 restore where=${cwd}/tmp/bacula-restores storage=File
51 7
52 <${cwd}/tmp/restore-list
53
54 yes
55 wait
56 restore where=${cwd}/tmp/bacula-restores storage=File
57 7
58 <${cwd}/tmp/restore-list
59
60 yes
61 wait
62 restore where=${cwd}/tmp/bacula-restores storage=File
63 7
64 <${cwd}/tmp/restore-list
65
66 yes
67 wait
68 restore where=${cwd}/tmp/bacula-restores storage=File
69 7
70 <${cwd}/tmp/restore-list
71
72 yes
73 wait
74 restore where=${cwd}/tmp/bacula-restores storage=File
75 7
76 <${cwd}/tmp/restore-list
77
78 yes
79 wait
80 restore where=${cwd}/tmp/bacula-restores storage=File
81 7
82 <${cwd}/tmp/restore-list
83
84 yes
85 wait
86 restore where=${cwd}/tmp/bacula-restores storage=File
87 7
88 <${cwd}/tmp/restore-list
89
90 yes
91 wait
92 restore where=${cwd}/tmp/bacula-restores storage=File
93 7
94 <${cwd}/tmp/restore-list
95
96 yes
97 wait
98 restore where=${cwd}/tmp/bacula-restores storage=File
99 7
100 <${cwd}/tmp/restore-list
101
102 yes
103 wait
104 messages
105 quit
106 END_OF_DATA
107
108 run_bacula
109 check_for_zombie_jobs storage=File
110 stop_bacula
111
112 check_two_logs
113 check_restore_tmp_build_diff
114 end_test