]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/2drive-3pool-test
Tweak more debug for FreeBSD to verify-data-test
[bacula/bacula] / regress / tests / 2drive-3pool-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 # Run a simple backup of the Bacula build directory. Create three
9 #   tapes, each in a different pool, then run some jobs asking for the
10 #   volume on drive three.  It should find it without moving the 
11 #   volume.
12 #
13 # This script uses the virtual disk autochanger and two drives
14 #
15 TestName="2drive-3pool-test"
16 JobName="2dr3pooldisk"
17 . scripts/functions
18
19 scripts/cleanup
20 scripts/copy-2disk-drive-confs
21 scripts/prepare-disk-changer
22 CLIENT=2drive2disk
23
24 echo "${cwd}/build" >${cwd}/tmp/file-list
25 change_jobname NightlySave $JobName
26 start_test
27 rm -f working/disk-changer.log
28
29 # Turn off Prefer Mounted Volumes so we use 2 drives
30 # outf="tmp/sed_tmp"
31 #  echo "s%# Prefer Mounted Volumes%  Prefer Mounted Volumes%g" >${outf}
32 # cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
33 # Comment the next line out to write everything to one drive
34 #  otherwise, it writes the two jobs to different drives
35 # sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
36
37 # Write out bconsole commands
38 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
39 @output /dev/null
40 messages
41 @$out ${cwd}/tmp/log1.out
42 @#setdebug level=51 storage=tape
43 label storage=tape volume=TestVolume001 slot=1 Pool=Default drive=0
44 label storage=tape volume=TestVolume002 slot=2 Pool=Full    drive=1
45 @#label storage=tape volume=TestVolume003 slot=3 Pool=Inc     drive=2
46 status storage=tape
47 @#run job=$JobName level=Full Pool=Inc yes
48 setdebug level=15 storage=tape
49 @#setdebug level=50 dir
50 run job=$JobName level=Full Pool=Full yes
51 run job=$JobName level=Full Pool=Default yes
52 run job=$JobName level=Full Pool=Default yes
53 run job=$JobName level=Full Pool=Default yes
54 @sleep 10
55 status storage=tape
56 list volumes
57 wait
58 list volumes
59 list jobs
60 status storage=tape
61 messages
62 quit
63 END_OF_DATA
64
65 # exit
66
67 run_bacula
68 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
69 @$out /dev/null
70 messages
71 @# 
72 @# now do a restore
73 @#
74 @$out ${cwd}/tmp/log2.out
75 setdebug level=0 storage=tape
76 setdebug level=0 dir
77 restore where=${cwd}/tmp/bacula-restores select all storage=tape done
78 yes
79 wait
80 messages
81 quit
82 END_OF_DATA
83
84 run_bconsole
85
86 check_for_zombie_jobs storage=tape
87 stop_bacula
88
89 check_two_logs
90 check_restore_diff
91
92 end_test