3 # Copyright (C) 2000-2017 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
6 # Run a backup of the build directory and check that it restarts correctly.
8 TestName="restart-sd-test"
13 scripts/copy-test-confs
15 setup_shstore # simulate shared storage if enabled
17 echo "${cwd}/build" >${cwd}/tmp/file-list
19 change_jobname NightlySave $JobName
22 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
25 @$out ${cwd}/tmp/log3.out
26 setbandwidth limit="1000 kb/s" client
27 @#setdebug level=20 dir
28 label storage=File volume=TestVolume001 slot=1 drive=0
37 pid=`cat $working/bacula-sd.*.pid`
38 if ps $pid | grep bacula-sd > /dev/null; then
41 print_debug "ERROR: Unable to find bacula-sd pid, please review the script"
49 $scripts/bacula-ctl-sd start
51 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
52 @$out ${cwd}/tmp/log3.out
57 @$out ${cwd}/tmp/log1.out
58 setbandwidth limit="10000000 kb/s" client
62 @$out ${cwd}/tmp/log2.out
63 restore where=$tmp/bacula-restores storage=File select all done
71 scripts/check_for_zombie_jobs storage=File