]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/fifo-test
ebl more fixes about pool=defaults
[bacula/bacula] / regress / tests / fifo-test
1 #!/bin/sh
2 #
3 # Attempt to backup from a fifo and restore to a fifo
4 #
5 TestName="fifo-test"
6 JobName=FIFOTest
7 . scripts/functions
8
9 scripts/cleanup
10 scripts/copy-test-confs
11 echo "${cwd}/tmp/bfifo" >${cwd}/tmp/file-list
12
13 rm -f ${cwd}/tmp/bfifo
14 mkfifo ${cwd}/tmp/bfifo
15 # send a file into the fifo
16 file=encrypt-bug.jpg
17 cat ${file} >${cwd}/tmp/bfifo&
18
19 start_test
20
21 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
22 @$out /dev/null
23 messages
24 @$out ${cwd}/tmp/log1.out
25 label storage=File1 volume=TestVolume001 pool=Default
26 run job=$JobName storage=File1 yes
27 wait
28 messages
29 quit
30 END_OF_DATA
31
32
33 run_bacula
34
35 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
36 @$out /dev/null
37 messages
38 @# 
39 @# now do a restore
40 @#
41 @$out ${cwd}/tmp/log2.out
42 @#setdebug level=50 client=$CLIENT
43 restore where=/  select all storage=File1 done
44 yes
45 wait
46 messages
47 @$out
48 quit
49 END_OF_DATA
50
51 cat <${cwd}/tmp/bfifo >${cwd}/tmp/${file}&
52
53 run_bconsole
54
55 check_for_zombie_jobs storage=File1
56 stop_bacula
57
58 check_two_logs
59 diff ${file} ${cwd}/tmp/${file}
60 dstat=$?
61 end_test