#!/bin/sh
+#
+# Copyright (C) 2000-2015 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
+
#
# Run a simple backup of the Bacula build directory but
# split the archive into two volumes, then restore
change_jobname NightlySave $JobName
start_test
+MaxVolBytes=3000000
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label storage=File1 volume=TestVolume001 pool=Default
-label storage=File1 volume=TestVolume002 pool=Default
-update Volume=TestVolume001 MaxVolBytes=3000000
+label storage=File1 volume=TestVolume001
+label storage=File1 volume=TestVolume002
+update Volume=TestVolume001 MaxVolBytes=$MaxVolBytes
run job=$JobName storage=File1 yes
wait
messages
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
-setdebug level=150 storage=File1
+setdebug level=150 storage=File1 trace=1
restore bootstrap=${cwd}/working/restore.bsr where=${cwd}/tmp/bacula-restores select storage=File1
unmark *
cd ${cwd}/build/src/cats
yes
wait
messages
-@$out
quit
END_OF_DATA