]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/vol-duration-changer
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / tests / vol-duration-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 # Run a simple backup of the Bacula build directory but 
9 #   create two volumes and set a short Volume duration on
10 #   the first so that it will be used, recycled.  Then
11 #   Bug #1032 indicates it will get a changer error when
12 #   loading the second volume. However, we cannot reproduce
13 #   this problem.
14 #
15 # This test uses an autochanger
16 #
17 TestName="vol-duration-changer"
18 JobName=VolDurationChanger
19 . scripts/functions
20
21 require_tape_drive
22 require_autochanger
23
24 scripts/cleanup
25 scripts/copy-2tape-confs
26 scripts/prepare-two-tapes
27
28 echo "${cwd}/build" >${cwd}/tmp/file-list
29
30 change_jobname NightlySave $JobName
31 start_test
32
33 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
34 @$out /dev/null
35 messages
36 @$out ${cwd}/tmp/log1.out
37 setdebug level=100 storage=tape
38 label storage=tape volume=TestVolume001 slot=$SLOT1 pool=Default drive=$DRIVE1
39 label storage=tape volume=TestVolume002 slot=$SLOT2 Pool=Default drive=$DRIVE1
40 update Volume=TestVolume001 VolUse=30
41 update Volume=TestVolume002 VolUse=30
42 run job=$JobName level=Full Storage=tape yes
43 @sleep 31
44 run job=$JobName level=Full Storage=tape yes
45 wait
46 messages
47 list volumes
48 @# 
49 @# now do a restore
50 @#
51 @$out ${cwd}/tmp/log2.out
52 restore where=${cwd}/tmp/bacula-restores select storage=tape
53 unmark *
54 mark *
55 done
56 yes
57 wait
58 messages
59 quit
60 END_OF_DATA
61
62 run_bacula
63 check_for_zombie_jobs storage=tape
64 stop_bacula
65
66 check_two_logs
67 check_restore_diff
68 end_test