]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/restart-job-test
Make restart2-test work
[bacula/bacula] / regress / tests / restart-job-test
1 #!/bin/sh
2 #
3 # Run a backup of the build directory but force it to have
4 #   a comm error, and check that it restarts correctly.
5 #
6 TestName="restart-job-test"
7 JobName=RestartJob
8 . scripts/functions
9
10 scripts/cleanup
11 scripts/copy-test-confs
12 echo "${cwd}/build" >${cwd}/tmp/file-list
13
14 change_jobname NightlySave $JobName
15 start_test
16
17 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
18 @$out /dev/null
19 messages
20 @$out ${cwd}/tmp/log1.out
21 setdebug level=0 trace=0 hangup=100 client
22 @#setdebug level=20 dir
23 label storage=File volume=TestVolume001
24 run job=$JobName yes
25 wait
26 messages
27 quit
28 END_OF_DATA
29
30 run_bacula  
31
32 scripts/check_for_zombie_jobs storage=File
33
34 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
35 @$out /dev/null
36 messages
37 @# 
38 @# now do a restore
39 @#
40 @$out ${cwd}/tmp/log2.out
41 restore where=$tmp/bacula-restores storage=File select all done
42 yes
43 wait
44 messages
45 quit
46 END_OF_DATA
47
48 run_bconsole
49 scripts/check_for_zombie_jobs storage=File
50 stop_bacula
51
52 check_two_logs
53 check_restore_diff
54 end_test