]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/span-vol-test
Begin simplification and cleanup of tests using shell functions
[bacula/bacula] / regress / tests / span-vol-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory but 
4 #   split the archive into four volumes, two of which are
5 #   totally full. I.e. make sure that bsr selects all tapes 
6 #   including those fully spanned.
7 #
8 TestName="span-vol-test"
9 JobName=SpanVol
10 . scripts/functions
11 set_debug 0
12
13 cwd=`pwd`
14 scripts/copy-test-confs
15 scripts/cleanup
16 echo "${cwd}/build" >/tmp/file-list
17 change_jobname $JobName
18
19 start_test
20
21 cat <<END_OF_DATA >tmp/bconcmds
22 @output /dev/null
23 messages
24 @$out tmp/log1.out
25 label storage=File1 volume=TestVolume004
26 label storage=File1 volume=TestVolume003
27 label storage=File1 volume=TestVolume002
28 label storage=File1 volume=TestVolume001
29 update Volume=TestVolume004 MaxVolBytes=3000000
30 update Volume=TestVolume003 MaxVolBytes=3000000
31 update Volume=TestVolume002 MaxVolBytes=3000000
32 run job=$JobName storage=File1 yes
33 wait
34 list volumes
35 messages
36 @# 
37 @# now do a restore
38 @#
39 @$out tmp/log2.out
40 restore where=${cwd}/tmp/bacula-restores select storage=File1
41 unmark *
42 mark *
43 done
44 yes
45 wait
46 messages
47 @$out
48 quit
49 END_OF_DATA
50
51 run_bacula
52 check_for_zombie_jobs storage=File1
53 stop_bacula
54
55 check_two_logs
56 check_restore_diff
57 end_test