]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/two-pool-tape
Update
[bacula/bacula] / regress / tests / two-pool-tape
1 #!/bin/sh
2 #
3 # This is Arno's test.  It uses two pools, two tapes, and
4 #  an autochanger. Note, the Director has three Pools in its 
5 #  conf:  Default, Full, and Inc.  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).
9 #
10 TestName="two-pool-tape"
11 JobName=twopooltape
12 . scripts/functions
13
14 require_tape_drive
15 require_autochanger
16
17 scripts/cleanup
18 scripts/copy-2tape-confs
19 echo "Prepare two tapes"
20 scripts/prepare-two-tapes
21 echo "Done prepare two tapes"
22  
23 # Make a relatively large backup set 3 x source code directory
24 echo "${cwd}/build" >${cwd}/tmp/file-list
25 echo "${cwd}/build" >>${cwd}/tmp/file-list
26 echo "${cwd}/build" >>${cwd}/tmp/file-list
27
28 start_test
29
30 # Write out bconsole commands to a file
31 cat <<END_OF_DATA >tmp/bconcmds
32 @output /dev/null
33 messages
34 @$out tmp/log1.out
35 setdebug level=150 storage=DDS-4
36 label storage=DDS-4 volume=TestVolume001 slot=$SLOT1 pool=Full drive=$DRIVE1
37 label storage=DDS-4 volume=TestVolume002 slot=$SLOT2 pool=Default drive=$DRIVE1
38 list volumes
39 @# Start job with Client run before and sleep
40 run job=NightlySave1 level=Full pool=Default yes
41 run job=NightlySave1 level=Full pool=Default yes
42 run job=NightlySave1 level=Full pool=Default yes
43 @# wait between starting jobs
44 @sleep 60
45 list volumes
46 run job=NightlySave2 level=Full pool=Full yes
47 run job=NightlySave2 level=Full pool=Full yes
48 run job=NightlySave2 level=Full pool=Full yes
49 @sleep 10
50 list volumes
51 messages
52 @sleep 10
53 list volumes
54 messages
55 @sleep 10
56 status storage=DDS-4
57 list volumes
58 messages
59 wait
60 list volumes
61 messages
62 @# 
63 @# now do a restore
64 @#
65 @$out tmp/log2.out
66 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
67 yes
68 wait
69 messages
70 @$out
71 quit
72 END_OF_DATA
73
74 run_bacula
75 check_for_zombie_jobs storage=DDS-4
76 stop_bacula
77
78 check_two_logs
79 check_restore_diff
80 end_test