]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/two-pool-changer
Commit libdbi changes
[bacula/bacula] / regress / tests / two-pool-changer
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-changer"
11 JobName=twopoolchanger
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 5 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 echo "${cwd}/build" >>${cwd}/tmp/file-list
28 echo "${cwd}/build" >>${cwd}/tmp/file-list
29
30 start_test
31
32 # Write out bconsole commands to a file
33 cat <<END_OF_DATA >tmp/bconcmds
34 @output /dev/null
35 messages
36 @$out tmp/log1.out
37 label storage=DDS-4 volume=TestVolume001 slot=$SLOT1 pool=Full drive=$DRIVE1
38 label storage=DDS-4 volume=TestVolume002 slot=$SLOT2 pool=Default drive=$DRIVE1
39 list volumes
40 @# Start job with Client run before and sleep
41 run job=NightlySave1 level=Full pool=Default yes
42 run job=NightlySave1 level=Full pool=Default yes
43 run job=NightlySave1 level=Full pool=Default yes
44 @# wait between starting jobs
45 @sleep 60
46 setdebug level=190 storage=DDS-4
47 run job=NightlySave2 level=Full pool=Full yes
48 run job=NightlySave2 level=Full pool=Full yes
49 run job=NightlySave2 level=Full pool=Full yes
50 @sleep 10
51 messages
52 @sleep 10
53 messages
54 @sleep 10
55 status storage=DDS-4
56 messages
57 wait
58 list volumes
59 messages
60 @# 
61 @# now do a restore
62 @#
63 @$out tmp/log2.out
64 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
65 yes
66 wait
67 messages
68 @$out
69 quit
70 END_OF_DATA
71
72 run_bacula
73 check_for_zombie_jobs storage=DDS-4
74 stop_bacula
75
76 check_two_logs
77 check_restore_diff
78 end_test