3 # This is Arno's test. It uses three pools, three tapes, and
4 # an autochanger. Note, the Director has four Pools in its
5 # conf: Default, Full, Inc, and Scratch. Default is used in the
6 # NightlySave job by default. What is backed up is what
7 # is in ${cwd}/tmp/file-list, which is by default the Bacula
8 # source code (i.e. the build directory).
10 # Note, we use the virtual disk autochanger.
12 TestName="three-pool-recycle-test"
13 JobName=Three-pool-recycle
18 scripts/copy-2disk-confs
19 scripts/prepare-disk-changer
21 # remove Client Run Before Job
22 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
23 sed "s%Client Run Before Job%#Client Run Before Job%" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
25 echo "${cwd}/build" >${cwd}/tmp/file-list
29 # Write out bconsole commands to a file
30 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
33 @$out ${cwd}/tmp/log1.out
34 @#setdebug level=150 storage=DDS-4
35 label storage=DDS-4 volume=TestVolume001 slot=1 pool=Full drive=0
36 label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
37 label storage=DDS-4 volume=TestVolume003 slot=3 pool=Scratch drive=0
38 update Volume=TestVolume001 maxvoljobs=1
39 update Volume=TestVolume002 maxvoljobs=1
40 update Volume=TestVolume003 volretention=7s
41 update Volume=TestVolume003 maxvoljobs=1
43 llist volume=TestVolume003
44 @# should pull Scratch volume
45 run job=NightlySave1 level=Full pool=Inc yes
47 update Volume=TestVolume003 volretention=7s
48 update Volume=TestVolume003 maxvoljobs=1
51 llist volume=TestVolume003
52 run job=NightlySave1 level=Full pool=Default yes
56 llist volume=TestVolume003
57 run job=NightlySave1 level=Full pool=Full yes
62 llist volume=TestVolume003
63 @# should recycle Scratch pool
64 run job=NightlySave2 level=Full pool=Inc yes
66 update Volume=TestVolume003 volretention=7s
67 update Volume=TestVolume003 maxvoljobs=1
71 @# should recycle Scratch pool
72 llist volume=TestVolume003
73 @#setdebug level=50 dir
74 run job=NightlySave2 level=Full pool=Default yes
76 update Volume=TestVolume003 volretention=7s
77 update Volume=TestVolume003 maxvoljobs=1
81 @# should recycle Scratch pool
82 run job=NightlySave2 level=Full pool=Full yes
91 @$out ${cwd}/tmp/log2.out
92 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
101 check_for_zombie_jobs storage=DDS-4