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