]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/virtualfull-bug-7154
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / tests / virtualfull-bug-7154
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2017 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6 # This should expose bug #7154
7 #
8 # This script uses the virtual disk autochanger and two drives
9 #
10 TestName="virtualfull-bug-7154"
11 JobName="backup"
12 . scripts/functions
13
14 scripts/cleanup
15 scripts/copy-2disk-tape-confs
16 CLIENT=2drive2disk
17
18 echo "${cwd}/build" >${cwd}/tmp/file-list
19 change_jobname NightlySave $JobName
20 start_test
21
22 # Turn on automatic label
23 $bperl -e 'add_attribute("$conf/bacula-dir.conf", "LabelFormat", "vol", "Pool")'
24 $bperl -e 'add_attribute("$conf/bacula-sd.conf", "LabelMedia", "yes", "Device")'
25
26
27 # Enable nextpool for virtualfull and accurate fag
28 $bperl -e 'add_attribute("$conf/bacula-dir.conf", "Accurate", "yes", "Job")'
29 $bperl -e 'add_attribute("$conf/bacula-dir.conf", "BackupsToKeep", "5", "Job")'
30 $bperl -e 'add_attribute("$conf/bacula-dir.conf", "DeleteConsolidatedJobs", "yes", "Job")'
31 $bperl -e 'add_attribute("$conf/bacula-dir.conf", "Storage", "tape", "Pool")'
32 $bperl -e 'add_attribute("$conf/bacula-dir.conf", "NextPool", "Default", "Pool", "Default")'
33
34 # Write out bconsole commands
35 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
36 @output /dev/null
37 messages
38 @$out ${cwd}/tmp/log1.out
39 @#setdebug level=100 client=$CLIENT 
40 run job=$JobName level=Full Pool=Default yes
41 wait
42 @exec "touch $cwd/build/po/fr.po"
43 run job=$JobName level=Incremental Pool=Default yes
44 wait
45 @exec "touch $cwd/build/po/fr.po"
46 run job=$JobName level=Incremental Pool=Default yes
47 wait
48 @exec "touch $cwd/build/po/fr.po"
49 run job=$JobName level=Incremental Pool=Default yes
50 wait
51 @exec "touch $cwd/build/po/fr.po"
52 run job=$JobName level=Incremental Pool=Default yes
53 wait
54 @exec "touch $cwd/build/po/fr.po"
55 run job=$JobName level=Incremental Pool=Default yes
56 wait
57 @exec "touch $cwd/build/po/fr.po"
58 run job=$JobName level=Incremental Pool=Default yes
59 wait
60 @exec "touch $cwd/build/po/fr.po"
61 run job=$JobName level=Incremental Pool=Default yes
62 wait
63 @exec "touch $cwd/build/po/fr.po"
64 run job=$JobName level=Incremental Pool=Default yes
65 wait
66 @#setdebug level=150 storage=tape trace=1
67 run job=$JobName level=VirtualFull yes
68 wait
69 messages
70 list jobs
71 messages
72 quit
73 END_OF_DATA
74
75 # exit
76
77 run_bacula
78
79 check_for_zombie_jobs storage=tape
80 stop_bacula
81
82 touch $tmp/log2.out
83 check_two_logs
84
85 end_test