]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/restore-by-file-test
This uses settings to save the expanded state of the pools in the media list.
[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
11 scripts/cleanup
12 scripts/copy-test-confs
13 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
14 mkdir ${cwd}/tmp/build
15 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
16 cd ${cwd}/tmp/build
17 ls >../1
18 cd ..
19 sed s%\^%${cwd}/tmp/build/% 1 | sort | uniq >restore-list
20 rm -f 1
21 cd ${cwd}
22
23 change_jobname CompressedTest $JobName
24 start_test
25
26 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
27 @output /dev/null
28 messages
29 @$out ${cwd}/tmp/log1.out
30 label storage=File volume=TestVolume001
31 run job=$JobName yes
32 wait
33 messages
34 @# 
35 @# now do a restore
36 @#
37 @$out ${cwd}/tmp/log2.out
38 restore where=${cwd}/tmp/bacula-restores storage=File
39 7
40 <${cwd}/tmp/restore-list
41
42 yes
43 wait
44 messages
45 @$out
46 quit
47 END_OF_DATA
48
49 run_bacula
50 check_for_zombie_jobs storage=File
51 stop_bacula
52
53 check_two_logs
54 check_restore_tmp_build_diff
55 end_test