]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/four-jobs-test
regress: more work on remote-fd test
[bacula/bacula] / regress / tests / four-jobs-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory using the compressed option
4 #   then backup four times, each with incremental then finally restore.
5 #   It should require at least 4 different bsrs.
6 #
7 TestName="four-jobs-test"
8 JobName=SpanVol
9 . scripts/functions
10
11 scripts/cleanup
12 scripts/copy-test-confs
13 echo "${cwd}/build" >${cwd}/tmp/file-list
14
15 change_jobname CompressedTest $JobName
16 start_test
17
18 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
19 @$out /dev/null
20 estimate job=$JobName listing
21 estimate job=$JobName
22 estimate job=$JobName
23 messages
24 @$out ${cwd}/tmp/log1.out
25 label storage=File volume=TestVolume001
26 run job=$JobName yes
27 wait
28 messages
29 quit
30 END_OF_DATA
31
32 run_bacula
33 check_for_zombie_jobs storage=File
34 # make some files for the incremental to pick up
35 touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o
36 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
37    
38 #
39 # run a second job
40 #
41 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
42 @$out /dev/null
43 messages
44 @$out  ${cwd}/tmp/log1.out
45 run job=$JobName yes
46 wait
47 messages
48 quit
49 END_OF_DATA
50
51 run_bconsole
52 check_for_zombie_jobs storage=File
53
54 touch ${cwd}/build/src/dird/*.c
55 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
56 #
57 # run a third job
58 #
59 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
60 @$out /dev/null
61 messages
62 @$out ${cwd}/tmp/log1.out
63 run job=$JobName yes
64 wait
65 messages
66 quit
67 END_OF_DATA
68
69 run_bconsole
70 check_for_zombie_jobs storage=File
71
72 # make some files for the incremental to pick up
73 touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
74 #
75 # run a fourth job
76 #
77 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
78 @$out /dev/null
79 messages
80 @$out ${cwd}/tmp/log1.out
81 run job=$JobName yes
82 wait
83 messages
84 quit
85 END_OF_DATA
86
87 run_bconsole
88 check_for_zombie_jobs storage=File
89
90
91 # now do several restores to ensure we cleanup between jobs
92 #
93 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
94 @$out /dev/null
95 restore where=${cwd}/tmp/bacula-restores select all storage=File done
96 yes
97 wait
98 restore where=${cwd}/tmp/bacula-restores select all storage=File done
99 yes
100 wait
101 @$out ${cwd}/tmp/log2.out
102 restore where=${cwd}/tmp/bacula-restores select storage=File
103 unmark *
104 mark *
105 done
106 yes
107 wait
108 messages
109 quit
110 END_OF_DATA
111
112 run_bconsole
113 check_for_zombie_jobs storage=File
114 stop_bacula
115
116 check_two_logs
117 check_restore_diff
118 end_test