]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/restore-disk-seek-test
Backport from Bacula Enterprise
[bacula/bacula] / regress / tests / restore-disk-seek-test
index 38fc0f7b7ba781e30fbb43bcb2b19df6d93c1256..d82c67ca813f810b48fda90e0c2cf09945cf9d98 100755 (executable)
@@ -1,4 +1,9 @@
 #!/bin/sh
+#
+# Copyright (C) 2000-2015 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
+
 #
 # Run a backup of the full bacula build directory, but with the
 #   Maximum File Size set. Then do a restore of a few files to kick in
@@ -14,7 +19,7 @@ scripts/cleanup
 scripts/copy-test-confs
 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
 rm -rf ${cwd}/tmp/build
-mkdir ${cwd}/tmp/build
+mkdir -p ${cwd}/tmp/build
 # Copy only the .c files (to be restored)
 #  set files to "*.c" for all c files
 files="ua_tree.c ua_update.c"
@@ -36,7 +41,7 @@ cd ${cwd}
 # Now arrange to backup *everything* 
 #
 rm -rf  ${cwd}/tmp/build
-mkdir ${cwd}/tmp/build
+mkdir -p ${cwd}/tmp/build
 cp -fp ${cwd}/build/src/dird/* ${cwd}/tmp/build
 #
 # Enable MaximumFileSize to ensure lots of JobMedia records and thus
@@ -49,7 +54,7 @@ change_jobname CompressedTest $JobName
 start_test
 
 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
 messages
 @$out ${cwd}/tmp/log1.out
 label storage=File volume=TestVolume001
@@ -73,7 +78,6 @@ restore bootstrap=${cwd}/tmp/kern.bsr where=${cwd}/tmp/bacula-restores storage=F
 yes
 wait
 messages
-@$out
 quit
 END_OF_DATA
 
@@ -83,7 +87,7 @@ stop_bacula
 
 # Now setup a control directory of only what we *should* restore
 rm -rf ${cwd}/tmp/build
-mkdir  ${cwd}/tmp/build
+mkdir -p  ${cwd}/tmp/build
 for i in ${files}; do
    cp -p ${cwd}/build/src/dird/${i} ${cwd}/tmp/build
 done