]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/incremental-tape
Copy trunk regress into Branch
[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
10 copy_tape_confs
11
12 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
13 if test ! -d ${cwd}/tmp/build ; then
14    mkdir ${cwd}/tmp/build
15 fi
16 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
17 cd ${cwd}/tmp
18 echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list
19 echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list
20 cd ${cwd}
21
22 change_jobname NightlySave $JobName
23 start_test
24
25 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
26 @output /dev/null
27 messages
28 @$out   ${cwd}/tmp/log1.out
29 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
30 run job=$JobName yes
31 wait
32 messages
33 quit
34 END_OF_DATA
35
36 run_bacula
37 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 >${cwd}/tmp/bconcmds
43 @output /dev/null
44 messages
45 @$out   ${cwd}/tmp/log1.out
46 run level=Incremental job=$JobName yes
47 wait
48 messages
49 @# 
50 @# now do a restore
51 @#
52 @$out   ${cwd}/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_bconsole
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 ${cwd}/tmp/build/*.c
72
73 check_two_logs
74 check_restore_tmp_build_diff
75 end_test