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