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