3 # Run a simple backup of the Bacula build directory but
4 # create three volumes and do six backups causing the
5 # volumes to be recycled, and cycling through the volumes
6 # twice. Tests maxvoljobs and volretention.
8 # Note, this test is a bit tricky, in that if you get too
9 # much data in the regress/build directory, the test will
10 # fail because it will run out of enough volumes to backup
13 TestName="recycle-test"
18 scripts/copy-test-confs
19 echo "${cwd}/build" >${cwd}/tmp/file-list
21 change_jobname NightlySave $JobName
24 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
27 @$out ${cwd}/tmp/log1.out
28 label storage=File1 volume=TestVolume001
29 label storage=File1 volume=TestVolume002
30 label storage=File1 volume=TestVolume003
31 label storage=File1 volume=TestVolume004
32 @# Note, this is going to fail if the pruning gets
33 @# to tight because the saved volume is too large.
34 @# In that case, either add another volume, or
35 @# increase the volume capacity a bit.
36 update Volume=TestVolume001 volretention=5s
37 update Volume=TestVolume001 maxvolbytes=200000000
38 update Volume=TestVolume002 volretention=5s
39 update Volume=TestVolume002 maxvolbytes=200000000
40 update Volume=TestVolume003 volretention=5s
41 update Volume=TestVolume003 maxvolbytes=200000000
42 update Volume=TestVolume004 volretention=5s
43 update Volume=TestVolume004 maxvolbytes=200000000
45 setdebug level=150 storage=File1
47 run job=$JobName storage=File1 level=full yes
48 run job=$JobName storage=File1 level=full yes
49 run job=$JobName storage=File1 level=full yes
54 run job=$JobName storage=File1 level=full yes
55 run job=$JobName storage=File1 level=full yes
56 run job=$JobName storage=File1 level=full yes
61 run job=$JobName storage=File1 level=full yes
62 run job=$JobName storage=File1 level=full yes
63 run job=$JobName storage=File1 level=full yes
68 run job=$JobName storage=File1 level=full yes
69 run job=$JobName storage=File1 level=full yes
70 run job=$JobName storage=File1 level=full yes
75 run job=$JobName storage=File1 level=full yes
76 run job=$JobName storage=File1 level=full yes
77 run job=$JobName storage=File1 level=full yes
84 @$out ${cwd}/tmp/log2.out
85 restore where=${cwd}/tmp/bacula-restores select storage=File1
96 check_for_zombie_jobs storage=File1