3 # Run a backup of the build directory but force it to have
4 # a comm error, and check that it restarts correctly.
6 TestName="restart2-job-test"
11 scripts/copy-test-confs
12 echo "${cwd}/build" >${cwd}/tmp/file-list
14 change_jobname NightlySave $JobName
17 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
20 @$out ${cwd}/tmp/log1.out
21 setbandwidth limit=1000 client
22 @#setdebug level=0 trace=0 hangup=100 client
23 @#setdebug level=20 dir
24 label storage=File volume=TestVolume001
32 # Note, the following stops and restarts the FD while it
33 # is running to simulate a crash, so it is normal if
34 # orphanned buffers are reported
36 $bin/bacula-ctl-fd stop
38 $bin/bacula-ctl-fd start
41 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
42 @$out ${cwd}/tmp/log1.out
46 select * from JobMedia where JobId=1;
53 scripts/check_for_zombie_jobs storage=File
55 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
61 @$out ${cwd}/tmp/log2.out
62 restore where=$tmp/bacula-restores storage=File select all done
70 scripts/check_for_zombie_jobs storage=File
76 grep "Sending Accurate" $tmp/log1.out >/dev/null
78 print_debug "ERROR: Second job should use Accurate"