]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/incremental-tape
regress: tweak the message in the update_win32()
[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 require_tape_drive
11
12 scripts/copy-tape-confs
13 scripts/cleanup-tape
14
15 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
16 if test ! -d ${cwd}/tmp/build ; then
17    mkdir -p ${cwd}/tmp/build
18 fi
19 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
20 cd ${cwd}/tmp
21 echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list
22 echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list
23 cd ${cwd}
24
25 change_jobname NightlySave $JobName
26 start_test
27
28 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
29 @$out /dev/null
30 messages
31 @$out   ${cwd}/tmp/log1.out
32 label storage=tape volume=TestVolume001 slot=0 pool=Default
33 run job=$JobName yes
34 wait
35 messages
36 quit
37 END_OF_DATA
38
39 run_bacula
40 check_for_zombie_jobs storage=tape
41
42 echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
43 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
44
45 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
46 @$out /dev/null
47 messages
48 @$out   ${cwd}/tmp/log1.out
49 run level=Incremental job=$JobName yes
50 wait
51 messages
52 @# 
53 @# now do a restore
54 @#
55 @$out   ${cwd}/tmp/log2.out
56 restore where=${cwd}/tmp/bacula-restores storage=tape
57 7
58 <${cwd}/tmp/restore-list
59
60 yes
61 wait
62 messages
63 quit
64 END_OF_DATA
65
66 run_bconsole
67 check_for_zombie_jobs storage=tape
68 stop_bacula
69
70 #
71 # Delete .c files because we will only restored the txt files
72 #
73 rm -f ${cwd}/tmp/build/*.c
74
75 check_two_logs
76 check_restore_tmp_build_diff
77 end_test