]> 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 /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 . config.out
15 if test x${AUTOCHANGER} = x/dev/null ; then
16    echo "two-pool-tape test skipped. No autochanger."
17    exit
18 fi
19
20 scripts/cleanup
21 scripts/copy-2tape-confs
22 echo "Prepare two tapes"
23 scripts/prepare-two-tapes
24 echo "Done prepare two tapes"
25  
26 # Make a relatively large backup set 5 x source code directory
27 echo "${cwd}/build" >/tmp/file-list
28 echo "${cwd}/build" >>/tmp/file-list
29 echo "${cwd}/build" >>/tmp/file-list
30 echo "${cwd}/build" >>/tmp/file-list
31 echo "${cwd}/build" >>/tmp/file-list
32
33 start_test
34
35 # Write out bconsole commands to a file
36 cat <<END_OF_DATA >tmp/bconcmds
37 @output /dev/null
38 messages
39 @$out tmp/log1.out
40 label storage=DDS-4 volume=TestVolume001 slot=1 pool=Full drive=0
41 label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
42 list volumes
43 @# Start job with Client run before and sleep
44 run job=NightlySave1 level=Full pool=Default yes
45 run job=NightlySave1 level=Full pool=Default yes
46 run job=NightlySave1 level=Full pool=Default yes
47 @# wait between starting jobs
48 @sleep 60
49 @#setdebug level=100 storage=DDS-4
50 run job=NightlySave2 level=Full pool=Full yes
51 run job=NightlySave2 level=Full pool=Full yes
52 run job=NightlySave2 level=Full pool=Full yes
53 @sleep 10
54 messages
55 @sleep 10
56 messages
57 @sleep 10
58 status storage=DDS-4
59 messages
60 wait
61 list volumes
62 messages
63 @# 
64 @# now do a restore
65 @#
66 @$out tmp/log2.out
67 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
68 yes
69 wait
70 messages
71 @$out
72 quit
73 END_OF_DATA
74
75 run_bacula
76 check_for_zombie_jobs storage=DDS-4
77 stop_bacula
78
79 check_two_logs
80 check_restore_diff
81 end_test