]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/fast-two-pool-test
Tweak another attempt to fix script in file-span-vol-test to be FreeBSD compatibile
[bacula/bacula] / regress / tests / fast-two-pool-test
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 #  Note, we use the virtual disk autochanger.
16 #
17 TestName="fast-two-pool-test"
18 JobName=Fast-two-pool
19 . scripts/functions
20
21 scripts/cleanup
22 scripts/copy-2disk-confs
23 scripts/prepare-disk-changer
24  
25 # Make a relatively large backup set 5 x source code directory
26 #  Reduced to 1 for portable
27 echo "${cwd}/build" >${cwd}/tmp/file-list
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
32 start_test
33
34 # Write out bconsole commands to a file
35 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
36 @output /dev/null
37 messages
38 @$out ${cwd}/tmp/log1.out
39 @#setdebug level=150 storage=tape
40 label storage=tape volume=TestVolume001 slot=1 pool=Full drive=0
41 label storage=tape 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 @# wait between starting jobs
47 @sleep 10
48 @#setdebug level=100 storage=tape
49 run job=NightlySave1 level=Full pool=Full yes
50 run job=NightlySave1 level=Full pool=Full yes
51 status storage=tape
52 messages
53 wait
54 list volumes
55 messages
56 @# 
57 @# now do a restore
58 @#
59 @$out ${cwd}/tmp/log2.out
60 list volumes
61 list jobs
62 status storage=tape
63 messages
64 @#setdebug level=200 storage=tape
65 @#setdebug level=200 client          
66 restore where=${cwd}/tmp/bacula-restores select all storage=tape done
67 yes
68 wait
69 messages
70 quit
71 END_OF_DATA
72
73 # exit
74 run_bacula
75 check_for_zombie_jobs storage=tape
76 stop_bacula
77
78 check_two_logs
79 check_restore_diff
80 end_test