]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/no-chksum-test
regress: Add test to do more than max reloads
[bacula/bacula] / regress / tests / no-chksum-test
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6
7 #
8 # Run a simple backup of the Bacula build directory without
9 # md5 signature then restore it.
10 #
11 TestName="no-chksum-test"
12 JobName=backup
13 . scripts/functions
14
15 scripts/cleanup
16 scripts/copy-confs
17
18 #
19 # Zap out any schedule in default conf file so that
20 #  it doesn't start during our test
21 #
22 outf="$tmp/sed_tmp"
23 echo "s%  Schedule =%# Schedule =%g" > $outf
24 echo "s%  signature =%# signature =%g" >> $outf
25 cp $scripts/bacula-dir.conf $tmp/1
26 sed -f $outf $tmp/1 >$scripts/bacula-dir.conf
27
28 change_jobname BackupClient1 $JobName
29 start_test
30
31 cat <<END_OF_DATA >$tmp/bconcmds
32 @output /dev/null
33 messages
34 @$out $tmp/log1.out
35 label volume=TestVolume001 storage=File pool=File
36 END_OF_DATA
37
38 run_bacula
39
40 cat <<END_OF_DATA >$tmp/bconcmds
41 @$out $tmp/log1.out
42 run job=$JobName yes
43 wait
44 messages
45 quit
46 END_OF_DATA
47
48 run_bconsole
49
50 #
51 # Now do a second backup after making a few changes
52 #
53 touch ${cwd}/build/po/fr.po
54 #
55
56 run_bconsole
57
58 dd if=/dev/zero of=$cwd/build/bigfile count=500000 > /dev/null
59
60 run_bconsole
61
62 rm -f $cwd/build/bigfile 
63
64 cat <<END_OF_DATA >$tmp/bconcmds
65 @output /dev/null
66 messages
67 @$out $tmp/log1.out
68 @# don't restore the bigfile, and try to see if it reads the whole volume
69 list files jobid=3
70 delete jobid=3
71 @# 
72 @# now do a restore
73 @#
74 @$out $tmp/log2.out  
75 setdebug level=150 trace=1 storage=File
76 restore where=$tmp/bacula-restores select all done
77 yes
78 wait
79 messages
80 quit
81 END_OF_DATA
82
83 run_bconsole
84
85 check_for_zombie_jobs storage=File
86 stop_bacula
87
88 check_two_logs
89 check_restore_diff
90 end_test