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
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
@# 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
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
yes
wait
messages
-@output
quit
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