]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/encrypt-bug-test
ebl remove sed s///i for freebsd and solaris
[bacula/bacula] / regress / tests / encrypt-bug-test
1 #!/bin/sh
2 #
3 # Run a simple backup of untitled15.jpg that fails to
4 #  restore properly in bug #763 
5 #
6 TestName="encrypt-bug-test"
7 JobName=Crypto-bug
8 . scripts/functions
9 set_debug 0
10
11 scripts/cleanup
12 scripts/copy-crypto-confs
13 echo "${cwd}/encrypt-bug.jpg" >/tmp/file-list
14 echo "${cwd}/encrypt-bug.jpg" >${cwd}/tmp/restore-list
15 echo "${cwd}/encrypt-bug.txt" >>/tmp/file-list
16 echo "${cwd}/encrypt-bug.txt" >>${cwd}/tmp/restore-list
17 echo "${cwd}/encrypt-bug2.txt" >>/tmp/file-list
18 echo "${cwd}/encrypt-bug2.txt" >>${cwd}/tmp/restore-list
19 files="encrypt-bug.jpg encrypt-bug.txt encrypt-bug2.txt"
20 mkdir -p ${cwd}/tmp/build
21 for i in ${files}; do
22    cp -p ${cwd}/encrypt-bug*.* ${cwd}/tmp/build
23 done
24
25 change_jobname NightlySave $JobName
26 start_test
27
28 cat <<END_OF_DATA >tmp/bconcmds
29 @$out /dev/null
30 messages
31 @$out tmp/log1.out
32 label storage=File volume=TestVolume001
33 setdebug level=100 fd
34 run job=$JobName yes
35 wait
36 messages
37 @# 
38 @# now do a restore
39 @#
40 @$out tmp/log2.out
41 setdebug level=100 fd
42 restore where=${cwd}/tmp/bacula-restores storage=File
43 5
44 mark *
45 done
46 yes
47 wait
48 messages
49 @$out
50 quit
51 END_OF_DATA
52
53 run_bacula
54 sleep 2
55 check_for_zombie_jobs storage=File 
56 stop_bacula
57
58 du -s build
59 du -s tmp/bacula-restores/
60
61
62 check_two_logs
63 diff ${cwd}/tmp/build ${cwd}/tmp/bacula-restores/${cwd} 2>&1 >/dev/null
64 dstat=$?
65 end_test