3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # Attempt to backup from a fifo and restore to a fifo
15 scripts/copy-test-confs
16 echo "${cwd}/tmp/bfifo" >${cwd}/tmp/file-list
18 rm -f ${cwd}/tmp/bfifo
19 mkfifo ${cwd}/tmp/bfifo
20 # send a file into the fifo
22 cat ${file} >${cwd}/tmp/bfifo&
26 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
29 @$out ${cwd}/tmp/log1.out
30 label storage=File1 volume=TestVolume001 slot=1 drive=0
31 setdebug level=10 storage=File1
32 run job=$JobName storage=File1 yes
37 select jobid,mediaid,startblock,endblock from JobMedia;
45 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
51 @$out ${cwd}/tmp/log2.out
52 @#setdebug level=50 client=$CLIENT
53 restore where=/ select all storage=File1 done
60 cat <${cwd}/tmp/bfifo >${cwd}/tmp/${file}&
64 check_for_zombie_jobs storage=File1
67 if [ "$debug" = 1 ] ; then
68 $bin/bls -d 50 -v -c $conf/bacula-sd.conf -V 'TestVolume001' FileStorage1
69 ls -l ${cwd}/tmp/TestVolume*
73 diff ${file} ${cwd}/tmp/${file} >/dev/null 2>&1