]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/vol-duration-2t1da-tape
Update
[bacula/bacula] / regress / tests / vol-duration-2t1da-tape
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory but 
4 #   create two volumes and set a short Volume duration on
5 #   the first so that it will be used, recycled.  Then
6 #   Bug #1032 indicates it will get a changer error when
7 #   loading the second volume. However, we cannot reproduce
8 #   this problem.
9 #
10 # This test uses an autochanger
11 #
12 TestName="vol-duration-2t:1d:a-tape"
13 JobName=VolDuration
14 . scripts/functions
15
16 if test x${AUTOCHANGER} = x/dev/null ; then
17    echo "$TestName test skipped. No autochanger."
18    exit
19 fi
20
21 scripts/cleanup
22 scripts/copy-2tape-confs
23 scripts/prepare-two-tapes
24
25 echo "${cwd}/build" >${cwd}/tmp/file-list
26
27 change_jobname NightlySave $JobName
28 start_test
29
30 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
31 @output /dev/null
32 messages
33 @$out ${cwd}/tmp/log1.out
34 setdebug level=100 storage=DDS-4
35 label storage=DDS-4 volume=TestVolume001 slot=1 pool=Default drive=0
36 label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Default drive=0
37 update Volume=TestVolume001 VolUse=30
38 update Volume=TestVolume002 VolUse=30
39 run job=$JobName level=Full Storage=DDS-4 yes
40 @sleep 31
41 run job=$JobName level=Full Storage=DDS-4 yes
42 wait
43 messages
44 list volumes
45 @# 
46 @# now do a restore
47 @#
48 @$out ${cwd}/tmp/log2.out
49 restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
50 unmark *
51 mark *
52 done
53 yes
54 wait
55 messages
56 @output
57 quit
58 END_OF_DATA
59
60 run_bacula
61 check_for_zombie_jobs storage=DDS-4
62 stop_bacula
63
64 check_two_logs
65 check_restore_diff
66 end_test