]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/vol-duration-changer
regress: Add test that mixes mssql and systemstate
[bacula/bacula] / regress / tests / vol-duration-changer
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-changer"
13 JobName=VolDurationChanger
14 . scripts/functions
15
16 require_tape_drive
17 require_autochanger
18
19 scripts/cleanup
20 scripts/copy-2tape-confs
21 scripts/prepare-two-tapes
22
23 echo "${cwd}/build" >${cwd}/tmp/file-list
24
25 change_jobname NightlySave $JobName
26 start_test
27
28 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
29 @$out /dev/null
30 messages
31 @$out ${cwd}/tmp/log1.out
32 setdebug level=100 storage=tape
33 label storage=tape volume=TestVolume001 slot=$SLOT1 pool=Default drive=$DRIVE1
34 label storage=tape volume=TestVolume002 slot=$SLOT2 Pool=Default drive=$DRIVE1
35 update Volume=TestVolume001 VolUse=30
36 update Volume=TestVolume002 VolUse=30
37 run job=$JobName level=Full Storage=tape yes
38 @sleep 31
39 run job=$JobName level=Full Storage=tape yes
40 wait
41 messages
42 list volumes
43 @# 
44 @# now do a restore
45 @#
46 @$out ${cwd}/tmp/log2.out
47 restore where=${cwd}/tmp/bacula-restores select storage=tape
48 unmark *
49 mark *
50 done
51 yes
52 wait
53 messages
54 quit
55 END_OF_DATA
56
57 run_bacula
58 check_for_zombie_jobs storage=tape
59 stop_bacula
60
61 check_two_logs
62 check_restore_diff
63 end_test