]> git.sur5r.net Git - bacula/bacula/blob - regress/win32/tests/incremental-tape
Final changes
[bacula/bacula] / regress / win32 / 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 copy_tape_confs
12
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 NightlySave $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 run_bacula
38 check_for_zombie_jobs storage=DDS-4
39
40 echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
41 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
42
43 cat <<END_OF_DATA >tmp/bconcmds
44 @output /dev/null
45 messages
46 @$out   tmp/log1.out
47 run level=Incremental job=$JobName yes
48 wait
49 messages
50 @# 
51 @# now do a restore
52 @#
53 @$out   tmp/log2.out
54 restore where=${cwd}/tmp/bacula-restores storage=DDS-4
55 7
56 <${cwd}/tmp/restore-list
57
58 yes
59 wait
60 messages
61 @output
62 quit
63 END_OF_DATA
64
65 run_bconsole
66 check_for_zombie_jobs storage=DDS-4
67 stop_bacula
68
69 #
70 # Delete .c files because we will only restored the txt files
71 #
72 rm -f tmp/build/*.c
73
74 check_two_logs
75 check_restore_tmp_build_diff
76 end_test