]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/restore-by-file-tape
regress: add function to create many dirs
[bacula/bacula] / regress / tests / restore-by-file-tape
index 2eb84d815076ddc78bd6b7882abc3e69e6faca85..51a9b8f1caf92005165ba8bbfafd13a53174af7c 100755 (executable)
@@ -9,7 +9,11 @@
 TestName="restore-by-file-tape"
 JobName=restorebyfile
 . scripts/functions
-copy_tape_confs
+
+require_tape_drive
+
+scripts/copy-tape-confs
+scripts/cleanup-tape
 
 echo "${cwd}/build" >${cwd}/tmp/file-list
 sed s%\^%${cwd}% ${cwd}/scripts/flist | sort | uniq >${cwd}/tmp/restore2-list
@@ -21,10 +25,10 @@ change_jobname NightlySave $JobName
 start_test
 
 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@output /dev/null
+@$out /dev/null
 messages
 @$out   ${cwd}/tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+label storage=tape volume=TestVolume001 slot=0 pool=Default
 run job=$JobName level=Full yes
 wait
 messages
@@ -32,16 +36,15 @@ messages
 @# now do a restore
 @#
 @$out   ${cwd}/tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores storage=DDS-4 file=<${cwd}/tmp/restore2-list
+restore where=${cwd}/tmp/bacula-restores storage=tape file=<${cwd}/tmp/restore2-list
 yes
 wait
 messages
-@output
 quit
 END_OF_DATA
 
 run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
 stop_bacula
 
 dstat=0
@@ -57,7 +60,7 @@ for i in `cat ${cwd}/tmp/restore2-list`; do
 done
 
 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@output /dev/null
+@$out /dev/null
 messages
 @$out   ${cwd}/tmp/log1.out
 run job=$JobName  level=Full yes
@@ -74,7 +77,6 @@ restore where=${cwd}/tmp/bacula-restores
 yes
 wait
 messages
-@output
 quit
 END_OF_DATA
 
@@ -83,13 +85,13 @@ END_OF_DATA
 #  test appending to a previously written tape
 #
 run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
 stop_bacula
 
 check_two_logs
 
-scripts/check_for_zombie_jobs storage=DDS-4
-bin/bacula stop 2>&1 >/dev/null
+scripts/check_for_zombie_jobs storage=tape
+stop_bacula
 for i in `cat ${cwd}/tmp/restore2-list`; do
    diff $i ${cwd}/tmp/bacula-restores$i
    if [ $? != 0 ] ; then