]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/two-pool-changer
Fix status alignment output reported by Wanderlei Huttel
[bacula/bacula] / regress / tests / two-pool-changer
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6
7 #
8 # This is Arno's test.  It uses two pools, two tapes, and
9 #  an autochanger. Note, the Director has three Pools in its 
10 #  conf:  Default, Full, and Inc.  Default is used in the
11 #  NightlySave job by default.  What is backed up is what
12 #  is in ${cwd}/tmp/file-list, which is by default the Bacula
13 #  source code (i.e. the build directory).
14 #
15 TestName="two-pool-changer"
16 JobName=twopoolchanger
17 . scripts/functions
18
19 require_tape_drive
20 require_autochanger
21
22 scripts/cleanup
23 scripts/copy-2tape-confs
24 echo "Prepare two tapes"
25 scripts/prepare-two-tapes
26 echo "Done prepare two tapes"
27  
28 # Make a relatively large backup set 5 x source code directory
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 # echo "${cwd}/build" >>${cwd}/tmp/file-list
34
35 start_test
36
37 # Write out bconsole commands to a file
38 cat <<END_OF_DATA >tmp/bconcmds
39 @$out /dev/null
40 messages
41 @$out tmp/log1.out
42 label storage=tape volume=TestVolume001 slot=$SLOT1 pool=Full drive=$DRIVE1
43 label storage=tape volume=TestVolume002 slot=$SLOT2 pool=Default drive=$DRIVE1
44 list volumes
45 @# Start job with Client run before and sleep
46 run job=NightlySave1 level=Full pool=Default yes
47 run job=NightlySave1 level=Full pool=Default yes
48 #run job=NightlySave1 level=Full pool=Default yes
49 @# wait between starting jobs
50 @sleep 60
51 setdebug level=190 storage=tape
52 run job=NightlySave2 level=Full pool=Full yes
53 run job=NightlySave2 level=Full pool=Full yes
54 #run job=NightlySave2 level=Full pool=Full yes
55 @sleep 10
56 status storage=tape
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=tape done
66 yes
67 wait
68 messages
69 quit
70 END_OF_DATA
71
72 run_bacula
73 check_for_zombie_jobs storage=tape
74 stop_bacula
75
76 check_two_logs
77 check_restore_diff
78 end_test