]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/incremental-tape
Update disk tests
[bacula/bacula] / regress / tests / incremental-tape
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory then create some           
4 #   new files, do an Incremental and restore those two files.
5 #
6 TestName="incremental-tape"
7 JobName=IncTape
8 . scripts/functions
9 set_debug 0
10
11 scripts/copy-tape-confs
12 scripts/cleanup-tape
13 echo "${cwd}/tmp/build" >/tmp/file-list
14 if test ! -d ${cwd}/tmp/build ; then
15    mkdir ${cwd}/tmp/build
16 fi
17 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
18 cd ${cwd}/tmp
19 echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list
20 echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list
21 cd ${cwd}
22
23 change_jobname $JobName
24 start_test
25
26 cat <<END_OF_DATA >tmp/bconcmds
27 @output /dev/null
28 messages
29 @$out   tmp/log1.out
30 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
31 run job=$JobName yes
32 wait
33 messages
34 quit
35 END_OF_DATA
36
37 scripts/check_for_zombie_jobs storage=DDS-4
38
39 echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
40 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
41
42 cat <<END_OF_DATA >tmp/bconcmds
43 @output /dev/null
44 messages
45 @$out   tmp/log1.out
46 run level=Incremental job=$JobName yes
47 wait
48 messages
49 @# 
50 @# now do a restore
51 @#
52 @$out   tmp/log2.out
53 restore where=${cwd}/tmp/bacula-restores storage=DDS-4
54 7
55 <${cwd}/tmp/restore-list
56
57 yes
58 wait
59 messages
60 @output
61 quit
62 END_OF_DATA
63
64 run_bacula
65 check_for_zombie_jobs storage=DDS-4
66 stop_bacula
67
68 #
69 # Delete .c files because we will only restored the txt files
70 #
71 rm -f tmp/build/*.c
72
73 check_two_logs
74 check_restore_tmp_build_diff
75 end_test