]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/four-concurrent-jobs-test
regress: enhance btape-test to detect NOT correct message
[bacula/bacula] / regress / tests / four-concurrent-jobs-test
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6
7 #
8 # Run four jobs at the same time, with two Volumes.
9 #   Set max Vol bytes of first volume
10 #   to less than total backup to force Bacula to use the second
11 #   Volume.
12 #
13 TestName="four-concurrent-jobs-test"
14 JobName=Four-concurrent-jobs
15 . scripts/functions
16
17 scripts/cleanup
18 scripts/copy-test-confs
19 echo "${cwd}/build" >${cwd}/tmp/file-list
20
21 change_jobname NightlySave $JobName
22 start_test
23
24 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
25 @output /dev/null
26 messages
27 @$out   ${cwd}/tmp/log1.out
28 label storage=File1
29 TestVolume001
30 label storage=File1
31 TestVolume002
32 update Volume=TestVolume001 MaxVolBytes=100000000
33 @#50000000
34 @#12
35 setdebug level=51 Storage=File1
36 status storage=File1
37 status client
38 llist volume=TestVolume001
39 llist volume=TestVolume002
40 list nextvol
41 1
42 run job=$JobName level=Full Storage=File1
43 yes
44 @#reload
45 llist volume=TestVolume001
46 llist volume=TestVolume002
47 list nextvol
48 1
49 run job=$JobName level=Full Storage=File1
50 yes
51 @#reload
52 llist volume=TestVolume001
53 llist volume=TestVolume002
54 list nextvol
55 1
56 run job=$JobName level=Full Storage=File1
57 yes
58 @#reload
59 llist volume=TestVolume001
60 llist volume=TestVolume002
61 list nextvol
62 1
63 status storage=File1
64 run job=$JobName level=Full Storage=File1
65 yes
66 status storage=File1
67 status client
68 @#reload
69 @#reload
70 list nextvol
71 1
72 @sleep 2
73 status dir
74 status client
75 status storage=File1
76 llist volume=TestVolume001
77 llist volume=TestVolume002
78 @#reload
79 @sleep 5
80 messages
81 @#reload
82 wait
83 status client
84 status storage=File1
85 @#reload
86 list nextvol
87 1
88 messages
89 @# 
90 @# now do a restore
91 @#
92 @$out ${cwd}/tmp/jobmedia.out
93 list volumes
94 sql
95 select JobId,MediaId,StartFile,StartBlock,EndFile,EndBlock from JobMedia;
96
97
98 @$out   ${cwd}/tmp/log2.out
99 status client
100 status storage=File1
101 setdebug level=100 Storage=File1
102 restore where=${cwd}/tmp/bacula-restores select storage=File1
103 unmark *
104 mark *
105 done
106 yes
107 wait
108 run job=$JobName level=Full Storage=File1 yes
109 wait
110 @#reload
111 messages
112 quit
113 END_OF_DATA
114
115 run_bacula
116 check_for_zombie_jobs storage=File1
117 stop_bacula
118
119 check_two_logs
120 check_restore_diff
121 end_test