]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/two-vol-test
Backport from Bacula Enterprise
[bacula/bacula] / regress / tests / two-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 two volumes
10 #
11 TestName="two-vol-test"
12 JobName=TwoVol
13 . scripts/functions
14
15 cwd=`pwd`
16 scripts/cleanup
17 scripts/copy-test-confs
18 echo "${cwd}/build" >${cwd}/tmp/file-list
19
20 change_jobname NightlySave $JobName
21 start_test
22
23 cat <<END_OF_DATA >tmp/bconcmds
24 @output /dev/null
25 messages
26 @$out tmp/log1.out
27 label storage=File1 volume=TestVolume002
28 label storage=File1 volume=TestVolume001
29 update Volume=TestVolume002 MaxVolBytes=3000000
30 run job=$JobName storage=File1 yes
31 wait
32 messages
33 @# 
34 @# now do a restore
35 @#
36 @$out tmp/log2.out
37 restore where=${cwd}/tmp/bacula-restores select all storage=File1 done
38 yes
39 wait
40 messages
41 quit
42 END_OF_DATA
43
44 run_bacula
45 check_for_zombie_jobs storage=File1
46 stop_bacula
47
48 check_two_logs
49 check_restore_diff
50 end_test