]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/span-vol-test
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / tests / span-vol-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 but 
9 #   split the archive into four volumes, two of which are
10 #   totally full. I.e. make sure that bsr selects all tapes 
11 #   including those fully spanned.
12 #
13 TestName="span-vol-test"
14 JobName=SpanVol
15 . scripts/functions
16
17 scripts/cleanup
18 scripts/copy-test-confs
19 echo "${cwd}/build" >${cwd}/tmp/file-list
20
21 change_jobname NightlySave $JobName
22 start_test
23
24 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
25 @output /dev/null
26 messages
27 @$out ${cwd}/tmp/log1.out
28 label storage=File1 volume=TestVolume004
29 label storage=File1 volume=TestVolume003
30 label storage=File1 volume=TestVolume002
31 label storage=File1 volume=TestVolume001
32 update Volume=TestVolume004 MaxVolBytes=3000000
33 update Volume=TestVolume003 MaxVolBytes=3000000
34 update Volume=TestVolume002 MaxVolBytes=3000000
35 run job=$JobName storage=File1 yes
36 wait
37 list volumes
38 messages
39 @# 
40 @# now do a restore
41 @#
42 @$out ${cwd}/tmp/log2.out
43 restore where=${cwd}/tmp/bacula-restores select storage=File1
44 unmark *
45 mark *
46 done
47 yes
48 wait
49 messages
50 quit
51 END_OF_DATA
52
53 run_bacula
54 check_for_zombie_jobs storage=File1
55 stop_bacula
56
57 check_two_logs
58 check_restore_diff
59 end_test