]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/delta-test
a4705261507f5f70fdd71bf543914b63b6da94d8
[bacula/bacula] / regress / tests / delta-test
1 #!/bin/sh
2 #
3 # Attempt to backup and restore a file with the delta plugin
4 #
5
6 TestName="delta-test"
7 JobName=pluginTest
8 . scripts/functions
9
10 scripts/cleanup
11 scripts/copy-plugin-confs
12
13 cat << EOF >> $conf/bacula-dir.conf
14 FileSet {
15  Name = "FS_DELTA"
16  Include {
17   Options {
18     signature=MD5
19   }
20  Plugin = "delta-test"
21  }
22 }
23 EOF
24
25 $bperl -e 'add_attribute("$conf/bacula-dir.conf", "FileSet", "FS_DELTA", "Job", "pluginTest")'
26
27
28 start_test
29
30 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
31 @$out /dev/null
32 messages
33 @$out ${cwd}/tmp/log1.out
34 label storage=File volume=TestVolume001
35 setdebug level=150 client=$CLIENT
36 estimate job=$JobName level=Full
37 setdebug level=50 client=$CLIENT
38 run job=$JobName yes
39 wait
40 status client=$CLIENT
41 messages
42 run job=$JobName level=Incremental yes
43 wait
44 status client=$CLIENT
45 run job=$JobName level=Incremental yes
46 wait
47 status client=$CLIENT
48 quit
49 END_OF_DATA
50
51 run_bacula
52
53 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
54 messages
55 @# 
56 @# now do a restore
57 @#
58 @$out ${cwd}/tmp/log2.out
59 setdebug level=50 client=$CLIENT
60 restore select all done
61 yes
62 wait
63 messages
64 @$out ${cwd}/tmp/log3.out
65 status client
66 setdebug level=0 client=$CLIENT
67 quit
68 END_OF_DATA
69
70 run_bconsole
71
72 check_two_logs
73
74 stop_bacula
75
76 end_test