]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/two-pool-tape
Delete unwanted subdirectory
[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 if test x${AUTOCHANGER} = x/dev/null ; then
15    echo "two-pool-tape test skipped. No autochanger."
16    exit
17 fi
18
19 scripts/cleanup
20 scripts/copy-2tape-confs
21 echo "Prepare two tapes"
22 scripts/prepare-two-tapes
23 echo "Done prepare two tapes"
24  
25 # Make a relatively large backup set 5 x source code directory
26 echo "${cwd}/build" >/tmp/file-list
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
32 start_test
33
34 # Write out bconsole commands to a file
35 cat <<END_OF_DATA >tmp/bconcmds
36 @output /dev/null
37 messages
38 @$out tmp/log1.out
39 label storage=DDS-4 volume=TestVolume001 slot=1 pool=Full drive=0
40 label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
41 list volumes
42 @# Start job with Client run before and sleep
43 run job=NightlySave1 level=Full pool=Default yes
44 run job=NightlySave1 level=Full pool=Default yes
45 run job=NightlySave1 level=Full pool=Default yes
46 @# wait between starting jobs
47 @sleep 60
48 @#setdebug level=100 storage=DDS-4
49 run job=NightlySave2 level=Full pool=Full yes
50 run job=NightlySave2 level=Full pool=Full yes
51 run job=NightlySave2 level=Full pool=Full yes
52 @sleep 10
53 messages
54 @sleep 10
55 messages
56 @sleep 10
57 status storage=DDS-4
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