]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/restore-by-file-test
8801eb9a63be19bcea22f6b1009a965adcf24043
[bacula/bacula] / regress / tests / restore-by-file-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory using the compressed option
4 #   then restore it.
5 #
6
7 TestName="restore-by-file-test"
8 JobName=SpanVol
9 . scripts/functions
10 set_debug 0
11
12 cwd=`pwd`
13 scripts/copy-test-confs
14 scripts/cleanup
15 echo "${cwd}/tmp/build" >/tmp/file-list
16 mkdir ${cwd}/tmp/build
17 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
18 cd ${cwd}/tmp/build
19 ls >../1
20 cd ..
21 sed s%\^%${cwd}/tmp/build/% 1 >restore-list
22 rm -f 1
23 cd ${cwd}
24
25 start_test
26
27 cat <<END_OF_DATA >tmp/bconcmds
28 @output /dev/null
29 messages
30 @$out tmp/log1.out
31 label storage=File volume=TestVolume001
32 run job=CompressedTest yes
33 wait
34 messages
35 @# 
36 @# now do a restore
37 @#
38 @$out tmp/log2.out
39 restore where=${cwd}/tmp/bacula-restores storage=File
40 7
41 <${cwd}/tmp/restore-list
42
43 yes
44 wait
45 messages
46 @$out
47 quit
48 END_OF_DATA
49
50 run_bacula
51 check_for_zombie_jobs storage=File
52 stop_bacula
53
54 check_two_logs
55 check_restore_tmp_build_diff
56 end_test