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