]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/restore-by-file-test
Final changes
[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=restorebyfile
9 . scripts/functions
10 set_debug 0
11
12 cwd=`pwd`
13 scripts/cleanup
14 scripts/copy-test-confs
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 change_jobname CompressedTest $JobName
26 start_test
27
28 cat <<END_OF_DATA >tmp/bconcmds
29 @output /dev/null
30 messages
31 @$out tmp/log1.out
32 label storage=File volume=TestVolume001
33 run job=$JobName yes
34 wait
35 messages
36 @# 
37 @# now do a restore
38 @#
39 @$out tmp/log2.out
40 restore where=${cwd}/tmp/bacula-restores storage=File
41 7
42 <${cwd}/tmp/restore-list
43
44 yes
45 wait
46 messages
47 @$out
48 quit
49 END_OF_DATA
50
51 run_bacula
52 check_for_zombie_jobs storage=File
53 stop_bacula
54
55 check_two_logs
56 check_restore_tmp_build_diff
57 end_test