]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/maxbytes-test
Big backport from Enterprise
[bacula/bacula] / regress / tests / maxbytes-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 a job with small Maximum Volume Bytes.  It should
9 #    create a lot of volumes. The test stresses auto-creation of
10 #    Volumes and restores from a lot of Volumes. Note, it creates
11 #    writes and then reads something like 110 Volumes (will vary
12 #    depending on the size of the Bacula source).
13 #
14 TestName="maxbytes-test"
15 JobName=maxbytes
16 . scripts/functions
17
18 scripts/cleanup
19 scripts/copy-test-confs
20 echo "${cwd}/build" >${cwd}/tmp/file-list
21
22 cp -f ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
23 sed "s%# Maximum Volume Bytes%  Maximum Volume Bytes%" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
24 cp -f ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
25 sed "s%# Simple Label Format%  Label Format%" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
26
27 change_jobname NightlySave $JobName
28 start_test
29
30 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
31 @output /dev/null
32 messages
33 @$out   ${cwd}/tmp/log1.out
34 setdebug level=50 Storage=File1
35 run job=$JobName level=Full Storage=File1 yes
36 wait
37 list volumes
38 messages
39 @# 
40 @# now do a restore
41 @#
42 @$out   ${cwd}/tmp/log2.out
43 restore where=${cwd}/tmp/bacula-restores select storage=File1
44 unmark *
45 mark *
46 done
47 yes
48 wait
49 reload
50 @#reload
51 status client
52 cancel inactive jobid=1,2
53 messages
54 quit
55 END_OF_DATA
56
57 run_bacula
58 check_for_zombie_jobs storage=File1
59 stop_bacula
60
61 check_two_logs
62 check_restore_diff
63 end_test