]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/accurate-test
e34b2b3e090aad6ea895501bb724f8db42d83c9d
[bacula/bacula] / regress / tests / accurate-test
1 #!/bin/sh
2 #
3 # Run a accurate backup of the Bacula build directory
4 #   then restore it.
5 #
6 TestName="accurate-test"
7 JobName=backup
8 . scripts/functions
9 scripts/cleanup
10
11 copy_test_confs
12 /bin/cp -f scripts/bacula-dir.conf.accurate bin/bacula-dir.conf
13
14 rm -rf ${cwd}/build/accurate.new
15 rm -rf ${cwd}/build/accurate
16
17 change_jobname Client1 $JobName
18 mkdir ${cwd}/build/accurate
19 echo "test test" > ${cwd}/build/accurate/xxx
20 echo "test test" > ${cwd}/build/accurate/yyy
21 echo "test test" > ${cwd}/build/accurate/zzz
22 echo ${cwd}/build > ${cwd}/tmp/file-list
23
24 start_test
25
26 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
27 @output /dev/null
28 messages
29 label volume=TestVolume001 storage=File pool=Default
30 messages
31 END_OF_DATA
32
33 run_bacula
34
35 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
36 @$out ${cwd}/tmp/log1.out
37 run job=$JobName yes
38 wait
39 messages
40 @# 
41 @# now do a restore
42 @#
43 @$out ${cwd}/tmp/log2.out  
44 restore where=${cwd}/tmp/bacula-restores select all done
45 yes
46 wait
47 messages
48 @$out
49 quit
50 END_OF_DATA
51
52 run_bconsole
53 check_for_zombie_jobs storage=File
54
55 check_two_logs
56 check_restore_diff
57
58 rm -rf ${cwd}/tmp/bacula-restores
59
60 # Now do a second backup after making a few changes
61 #
62 rm ${cwd}/build/accurate/xxx
63
64 run_bconsole
65 check_for_zombie_jobs storage=File
66
67 check_two_logs
68 check_restore_diff
69
70 rm -rf ${cwd}/tmp/bacula-restores
71
72 # This doesn't work yet...
73 #
74 ## Now do a second backup after making a few changes
75 ##
76 #mv ${cwd}/build/accurate ${cwd}/build/accurate.new
77 #
78 #run_bconsole
79 #check_for_zombie_jobs storage=File
80 #
81 #check_two_logs
82 #check_restore_diff
83 #
84 #rm -rf ${cwd}/tmp/bacula-restores
85 #
86 stop_bacula
87 end_test