]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/maxvol-test
Copy trunk regress into Branch
[bacula/bacula] / regress / tests / maxvol-test
1 #!/bin/sh
2 #
3 # Run four jobs at the same time, with four Volumes, but set
4 #   Maximum Job Volumes = 1 on each of the Volumes.  Note,
5 #   Volume 2 will probably have two jobs on it.  Something to
6 #   be fixed in a later version.
7 #
8 TestName="maxvol-test"
9 JobName=maxvol
10 . scripts/functions
11
12 scripts/cleanup
13 scripts/copy-test-confs
14 echo "${cwd}/build" >${cwd}/tmp/file-list
15
16 cp -f ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
17 sed "s%# Maximum Volume Jobs%  Maximum Volume Jobs%" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
18
19
20 change_jobname NightlySave $JobName
21 start_test
22
23 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
24 @output /dev/null
25 messages
26 @$out   ${cwd}/tmp/log1.out
27 label storage=File1 volume=TestVolume001
28 label storage=File1 volume=TestVolume002
29 label storage=File1 volume=TestVolume003
30 label storage=File1 volume=TestVolume004
31 update Volume=TestVolume001 MaxVolBytes=100000000
32 @#50000000
33 @#12
34 setdebug level=100 Storage=File1
35 run job=$JobName level=Full Storage=File1 yes
36 run job=$JobName level=Full Storage=File1 yes
37 run job=$JobName level=Full Storage=File1 yes
38 wait
39 list volumes
40 messages
41 @# 
42 @# now do a restore
43 @#
44 @$out   ${cwd}/tmp/log2.out
45 restore where=${cwd}/tmp/bacula-restores select storage=File1
46 unmark *
47 mark *
48 done
49 yes
50 wait
51 reload
52 reload
53 messages
54 @output
55 quit
56 END_OF_DATA
57
58 run_bacula
59 check_for_zombie_jobs storage=File1
60 stop_bacula
61
62 check_two_logs
63 check_restore_diff
64 end_test