]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/two-pool-test
Update
[bacula/bacula] / regress / tests / two-pool-test
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 /tmp/file-list, which is by default the Bacula
8 #  source code (i.e. the build directory).
9 #
10 #  Note, we use the virtual disk autochanger.
11 #
12 TestName="two-pool-test"
13 JobName=Two-pool
14 . scripts/functions
15 set_debug 0
16
17 . config.out
18 if test x${AUTOCHANGER} = x/dev/null ; then
19    echo "two-pool-test skipped. No autochanger."
20    exit
21 fi
22 cwd=`pwd`
23 scripts/cleanup
24 scripts/copy-2disk-confs
25 scripts/prepare-two-disks
26  
27 # Make a relatively large backup set 5 x source code directory
28 #  Reduced to 1 for portable
29 echo "${cwd}/build" >/tmp/file-list
30
31 start_test
32
33 # Write out bconsole commands to a file
34 cat <<END_OF_DATA >tmp/bconcmds
35 @output /dev/null
36 messages
37 @$out tmp/log1.out
38 label storage=DDS-4 volume=TestVolume001 slot=1 pool=Full drive=0
39 label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
40 list volumes
41 @# Start job with Client run before and sleep
42 run job=NightlySave1 level=Full pool=Default yes
43 run job=NightlySave1 level=Full pool=Default yes
44 run job=NightlySave1 level=Full pool=Default yes
45 @# wait between starting jobs
46 @sleep 60
47 @#setdebug level=100 storage=DDS-4
48 run job=NightlySave2 level=Full pool=Full yes
49 run job=NightlySave2 level=Full pool=Full yes
50 run job=NightlySave2 level=Full pool=Full yes
51 @sleep 10
52 messages
53 @sleep 10
54 messages
55 @sleep 10
56 status storage=DDS-4
57 messages
58 wait
59 list volumes
60 messages
61 @# 
62 @# now do a restore
63 @#
64 @$out tmp/log2.out
65 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
66 yes
67 wait
68 messages
69 @$out
70 quit
71 END_OF_DATA
72
73 run_bacula
74 check_for_zombie_jobs storage=DDS-4
75 stop_bacula
76
77 check_two_logs
78 check_restore_diff
79 end_test