2 * Bacula File Daemon Job processing
4 * Kern Sibbald, October MM
10 Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
12 This program is free software; you can redistribute it and/or
13 modify it under the terms of the GNU General Public License as
14 published by the Free Software Foundation; either version 2 of
15 the License, or (at your option) any later version.
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 General Public License for more details.
22 You should have received a copy of the GNU General Public
23 License along with this program; if not, write to the Free
24 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
32 extern char my_name[];
33 extern CLIENT *me; /* our client resource */
35 /* Imported functions */
36 extern int status_cmd(JCR *jcr);
38 /* Forward referenced functions */
39 static int backup_cmd(JCR *jcr);
40 static int bootstrap_cmd(JCR *jcr);
41 static int cancel_cmd(JCR *jcr);
42 static int setdebug_cmd(JCR *jcr);
43 static int estimate_cmd(JCR *jcr);
44 static int exclude_cmd(JCR *jcr);
45 static int hello_cmd(JCR *jcr);
46 static int job_cmd(JCR *jcr);
47 static int include_cmd(JCR *jcr);
48 static int level_cmd(JCR *jcr);
49 static int verify_cmd(JCR *jcr);
50 static int restore_cmd(JCR *jcr);
51 static int storage_cmd(JCR *jcr);
52 static int session_cmd(JCR *jcr);
53 static int response(BSOCK *sd, char *resp, char *cmd);
54 static void filed_free_jcr(JCR *jcr);
55 static int open_sd_read_session(JCR *jcr);
56 static int send_bootstrap_file(JCR *jcr);
59 /* Exported functions */
67 * The following are the recognized commands from the Director.
69 static struct s_cmds cmds[] = {
70 {"backup", backup_cmd},
71 {"cancel", cancel_cmd},
72 {"setdebug=", setdebug_cmd},
73 {"estimate", estimate_cmd},
74 {"exclude", exclude_cmd},
76 {"include", include_cmd},
78 {"level = ", level_cmd},
79 {"restore", restore_cmd},
80 {"session", session_cmd},
81 {"status", status_cmd},
82 {"storage ", storage_cmd},
83 {"verify", verify_cmd},
84 {"bootstrap",bootstrap_cmd},
85 {NULL, NULL} /* list terminator */
88 /* Commands received from director that need scanning */
89 static char jobcmd[] = "JobId=%d Job=%127s SDid=%d SDtime=%d Authorization=%100s";
90 static char storaddr[] = "storage address=%s port=%d\n";
91 static char sessioncmd[] = "session %s %ld %ld %ld %ld %ld %ld\n";
92 static char restorecmd[] = "restore where=%s\n";
93 static char verifycmd[] = "verify level=%20s\n";
95 /* Responses sent to Director */
96 static char errmsg[] = "2999 Invalid command\n";
97 static char no_auth[] = "2998 No Authorization\n";
98 static char OKinc[] = "2000 OK include\n";
99 static char OKest[] = "2000 OK estimate files=%ld bytes=%ld\n";
100 static char OKexc[] = "2000 OK exclude\n";
101 static char OKlevel[] = "2000 OK level\n";
102 static char OKbackup[] = "2000 OK backup\n";
103 static char OKbootstrap[] = "2000 OK bootstrap\n";
104 static char OKverify[] = "2000 OK verify\n";
105 static char OKrestore[] = "2000 OK restore\n";
106 static char OKsession[] = "2000 OK session\n";
107 static char OKstore[] = "2000 OK storage\n";
108 static char OKjob[] = "2000 OK Job\n";
109 static char OKsetdebug[] = "2000 OK setdebug=%d\n";
110 static char BADjob[] = "2901 Bad Job\n";
112 /* Responses received from Storage Daemon */
113 static char OK_end[] = "3000 OK end\n";
114 static char OK_open[] = "3000 OK open ticket = %d\n";
115 static char OK_data[] = "3000 OK data\n";
116 static char OK_append[] = "3000 OK append data\n";
117 static char OKSDbootstrap[] = "3000 OK bootstrap\n";
120 /* Commands sent to Storage Daemon */
121 static char append_open[] = "append open session\n";
122 static char append_data[] = "append data %d\n";
123 static char append_end[] = "append end session %d\n";
124 static char append_close[] = "append close session %d\n";
125 static char read_open[] = "read open session = %s %ld %ld %ld %ld %ld %ld\n";
126 static char read_data[] = "read data %d\n";
127 static char read_close[] = "read close session %d\n";
130 * Accept requests from a Director
132 * NOTE! We are running as a separate thread
134 * Send output one line
135 * at a time followed by a zero length transmission.
137 * Return when the connection is terminated or there
140 * Basic task here is:
141 * Authenticate Director (during Hello command).
142 * Accept commands one at a time from the Director
146 void *handle_client_request(void *dirp)
150 BSOCK *dir = (BSOCK *)dirp;
152 jcr = new_jcr(sizeof(JCR), filed_free_jcr); /* create JCR */
153 jcr->dir_bsock = dir;
154 jcr->ff = init_find_files();
155 jcr->start_time = time(NULL);
156 jcr->last_fname = get_pool_memory(PM_FNAME);
157 jcr->client_name = get_memory(strlen(my_name) + 1);
158 strcpy(jcr->client_name, my_name);
160 /**********FIXME******* add command handler error code */
162 for (quit=0; !quit;) {
165 if (bnet_recv(dir) <= 0) {
166 break; /* connection terminated */
168 dir->msg[dir->msglen] = 0;
169 Dmsg1(100, "<dird: %s", dir->msg);
171 for (i=0; cmds[i].cmd; i++) {
172 if (strncmp(cmds[i].cmd, dir->msg, strlen(cmds[i].cmd)) == 0) {
173 if (!jcr->authenticated && cmds[i].func != hello_cmd) {
174 bnet_fsend(dir, no_auth);
177 if (!cmds[i].func(jcr)) { /* do command */
178 quit = TRUE; /* error, get out */
179 Pmsg0(20, "Command error\n");
181 found = TRUE; /* indicate command found */
185 if (!found) { /* command not found */
186 bnet_fsend(dir, errmsg);
191 Dmsg0(100, "Calling term_find_files\n");
192 term_find_files(jcr->ff);
193 Dmsg0(100, "Done with term_find_files\n");
194 free_jcr(jcr); /* destroy JCR record */
195 Dmsg0(100, "Done with free_jcr\n");
200 * Hello from Director he must identify himself and provide his
203 static int hello_cmd(JCR *jcr)
205 Dmsg0(20, "Calling Authenticate\n");
206 if (!authenticate_director(jcr)) {
209 Dmsg0(20, "OK Authenticate\n");
210 jcr->authenticated = TRUE;
217 static int cancel_cmd(JCR *jcr)
219 BSOCK *dir = jcr->dir_bsock;
220 char Job[MAX_NAME_LENGTH];
223 if (sscanf(dir->msg, "cancel Job=%127s", Job) == 1) {
224 if (!(cjcr=get_jcr_by_full_name(Job))) {
225 bnet_fsend(dir, "2901 Job %s not found.\n", Job);
227 cjcr->JobStatus = JS_Cancelled;
229 bnet_fsend(dir, "2001 Job %s marked to be cancelled.\n", Job);
232 bnet_fsend(dir, "2902 Error scanning cancel command.\n");
234 bnet_sig(dir, BNET_EOD);
240 * Set debug level as requested by the Director
243 static int setdebug_cmd(JCR *jcr)
245 BSOCK *dir = jcr->dir_bsock;
248 Dmsg1(10, "setdebug_cmd: %s", dir->msg);
249 if (sscanf(dir->msg, "setdebug=%d", &level) != 1 || level < 0) {
250 bnet_fsend(dir, "2991 Bad setdebug command: %s\n", dir->msg);
254 return bnet_fsend(dir, OKsetdebug, level);
258 static int estimate_cmd(JCR *jcr)
260 BSOCK *dir = jcr->dir_bsock;
262 return bnet_fsend(dir, OKest, jcr->JobFiles, jcr->JobBytes);
266 * Get JobId and Storage Daemon Authorization key from Director
268 static int job_cmd(JCR *jcr)
270 BSOCK *dir = jcr->dir_bsock;
271 POOLMEM *sd_auth_key;
273 sd_auth_key = get_memory(dir->msglen);
274 if (sscanf(dir->msg, jobcmd, &jcr->JobId, jcr->Job,
275 &jcr->VolSessionId, &jcr->VolSessionTime,
277 bnet_fsend(dir, BADjob);
278 Jmsg(jcr, M_FATAL, 0, _("Bad Job Command: %s\n"), dir->msg);
279 free_pool_memory(sd_auth_key);
282 jcr->sd_auth_key = bstrdup(sd_auth_key);
283 free_pool_memory(sd_auth_key);
284 Dmsg2(20, "JobId=%d Auth=%s\n", jcr->JobId, jcr->sd_auth_key);
285 return bnet_fsend(dir, OKjob);
290 * Get list of files/directories to include from Director
293 static int include_cmd(JCR *jcr)
295 BSOCK *dir = jcr->dir_bsock;
297 while (bnet_recv(dir) > 0) {
298 dir->msg[dir->msglen] = 0;
299 strip_trailing_junk(dir->msg);
300 Dmsg1(110, "filed<dird: include file %s\n", dir->msg);
301 add_fname_to_include_list(jcr->ff, 1, dir->msg);
304 return bnet_fsend(dir, OKinc);
308 * Get list of files to exclude from Director
311 static int exclude_cmd(JCR *jcr)
313 BSOCK *dir = jcr->dir_bsock;
316 while (bnet_recv(dir) > 0) {
317 dir->msg[dir->msglen] = 0;
318 strip_trailing_junk(dir->msg);
319 /* Skip leading options */
320 for (p=dir->msg; *p && *p != ' '; p++)
323 for ( ; *p && *p == ' '; p++)
325 add_fname_to_exclude_list(jcr->ff, p);
326 Dmsg1(110, "<dird: exclude file %s\n", dir->msg);
329 return bnet_fsend(dir, OKexc);
333 static int bootstrap_cmd(JCR *jcr)
335 BSOCK *dir = jcr->dir_bsock;
336 POOLMEM *fname = get_pool_memory(PM_FNAME);
339 if (jcr->RestoreBootstrap) {
340 unlink(jcr->RestoreBootstrap);
341 free_pool_memory(jcr->RestoreBootstrap);
343 Mmsg(&fname, "%s/%s.%s.bootstrap", me->working_directory, me->hdr.name,
345 Dmsg1(400, "bootstrap=%s\n", fname);
346 jcr->RestoreBootstrap = fname;
347 bs = fopen(fname, "a+"); /* create file */
349 Jmsg(jcr, M_FATAL, 0, _("Could not create bootstrap file %s: ERR=%s\n"),
350 jcr->RestoreBootstrap, strerror(errno));
351 free_pool_memory(jcr->RestoreBootstrap);
352 jcr->RestoreBootstrap = NULL;
356 while (bnet_recv(dir) > 0) {
357 Dmsg1(200, "filed<dird: bootstrap file %s\n", dir->msg);
362 return bnet_fsend(dir, OKbootstrap);
367 * Get backup level from Director
370 static int level_cmd(JCR *jcr)
372 BSOCK *dir = jcr->dir_bsock;
377 level = (char *) get_memory(dir->msglen);
378 Dmsg1(110, "level_cmd: %s", dir->msg);
379 if (sscanf(dir->msg, "level = %s ", level) != 1) {
380 Jmsg1(jcr, M_FATAL, 0, _("Bad level command: %s\n"), dir->msg);
385 * Full backup requested
387 if (strcmp(level, "full") == 0) {
388 jcr->save_level = L_FULL;
390 * Backup requested since <date> <time>
391 * This form is also used for incremental and differential
393 } else if (strcmp(level, "since") == 0) {
394 jcr->save_level = L_SINCE;
395 if (sscanf(dir->msg, "level = since %d-%d-%d %d:%d:%d",
396 &tm.tm_year, &tm.tm_mon, &tm.tm_mday,
397 &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) {
398 Jmsg1(jcr, M_FATAL, 0, "Bad scan of date/time: %s\n", dir->msg);
404 tm.tm_wday = tm.tm_yday = 0;
407 Dmsg1(100, "Got since time: %s", ctime(&mtime));
408 jcr->incremental = 1;
411 Jmsg1(jcr, M_FATAL, 0, "Unknown backup level: %s\n", level);
416 return bnet_fsend(dir, OKlevel);
420 * Get session parameters from Director -- this is for a Restore command
422 static int session_cmd(JCR *jcr)
424 BSOCK *dir = jcr->dir_bsock;
426 Dmsg1(100, "SessionCmd: %s", dir->msg);
427 if (sscanf(dir->msg, sessioncmd, jcr->VolumeName,
428 &jcr->VolSessionId, &jcr->VolSessionTime,
429 &jcr->StartFile, &jcr->EndFile,
430 &jcr->StartBlock, &jcr->EndBlock) != 7) {
431 Jmsg(jcr, M_FATAL, 0, "Bad session command: %s", dir->msg);
435 return bnet_fsend(dir, OKsession);
439 * Get address of storage daemon from Director
442 static int storage_cmd(JCR *jcr)
444 int stored_port; /* storage daemon port */
445 BSOCK *dir = jcr->dir_bsock;
446 BSOCK *sd; /* storage daemon bsock */
448 Dmsg1(100, "StorageCmd: %s", dir->msg);
449 if (sscanf(dir->msg, storaddr, &jcr->stored_addr, &stored_port) != 2) {
450 Jmsg(jcr, M_FATAL, 0, _("Bad storage command: %s"), dir->msg);
453 Dmsg2(10, "Open storage: %s:%d\n", jcr->stored_addr, stored_port);
454 /* Open command communications with Storage daemon */
455 /* Try to connect for 1 hour at 10 second intervals */
456 sd = bnet_connect(jcr, 10, 3600, _("Storage daemon"),
457 jcr->stored_addr, NULL, stored_port, 1);
459 Jmsg(jcr, M_FATAL, 0, _("Failed to connect to Storage daemon: %s:%d\n"),
460 jcr->stored_addr, stored_port);
464 jcr->store_bsock = sd;
466 bnet_fsend(sd, "Hello Start Job %s\n", jcr->Job);
467 if (!authenticate_storagedaemon(jcr)) {
468 Jmsg(jcr, M_FATAL, 0, _("Failed to authenticate Storage daemon.\n"));
471 Dmsg0(10, "Authenticated with SD.\n");
473 /* Send OK to Director */
474 return bnet_fsend(dir, OKstore);
479 * Do a backup. For now, we handle only Full and Incremental.
481 static int backup_cmd(JCR *jcr)
483 BSOCK *dir = jcr->dir_bsock;
484 BSOCK *sd = jcr->store_bsock;
487 jcr->JobStatus = JS_Blocked;
488 jcr->JobType = JT_BACKUP;
489 Dmsg1(100, "begin backup ff=%p\n", jcr->ff);
492 Jmsg(jcr, M_FATAL, 0, _("Cannot contact Storage daemon\n"));
493 jcr->JobStatus = JS_ErrorTerminated;
497 bnet_fsend(dir, OKbackup);
498 Dmsg1(110, "bfiled>dird: %s", dir->msg);
501 * Send Append Open Session to Storage daemon
503 bnet_fsend(sd, append_open);
504 Dmsg1(110, ">stored: %s", sd->msg);
506 * Expect to receive back the Ticket number
508 if (bnet_recv(sd) > 0) {
509 Dmsg1(110, "<stored: %s", sd->msg);
510 if (sscanf(sd->msg, OK_open, &jcr->Ticket) != 1) {
511 Jmsg(jcr, M_FATAL, 0, _("Bad response to append open: %s\n"), sd->msg);
512 jcr->JobStatus = JS_ErrorTerminated;
515 Dmsg1(10, "Got Ticket=%d\n", jcr->Ticket);
517 Jmsg(jcr, M_FATAL, 0, _("Bad response from stored to open command\n"));
518 jcr->JobStatus = JS_ErrorTerminated;
523 * Send Append data command to Storage daemon
525 bnet_fsend(sd, append_data, jcr->Ticket);
526 Dmsg1(110, ">stored: %s", sd->msg);
529 * Expect to get OK data
531 Dmsg1(110, "<stored: %s", sd->msg);
532 if (!response(sd, OK_data, "Append Data")) {
533 jcr->JobStatus = JS_ErrorTerminated;
538 * Send Files to Storage daemon
540 Dmsg1(10, "begin blast ff=%p\n", jcr->ff);
541 if (!blast_data_to_storage_daemon(jcr, NULL)) {
542 jcr->JobStatus = JS_ErrorTerminated;
544 jcr->JobStatus = JS_Terminated;
546 * Expect to get response to append_data from Storage daemon
548 if (!response(sd, OK_append, "Append Data")) {
549 jcr->JobStatus = JS_ErrorTerminated;
554 * Send Append End Data to Storage daemon
556 bnet_fsend(sd, append_end, jcr->Ticket);
558 if (!response(sd, OK_end, "Append End")) {
559 jcr->JobStatus = JS_ErrorTerminated;
564 * Send Append Close to Storage daemon
566 bnet_fsend(sd, append_close, jcr->Ticket);
567 while ((len = bnet_recv(sd)) > 0) {
568 /* discard anything else returned from SD */
571 Jmsg(jcr, M_FATAL, 0, _("<stored: net_recv len=%d: ERR=%s\n"), len, bnet_strerror(sd));
572 jcr->JobStatus = JS_ErrorTerminated;
578 /* Inform Storage daemon that we are done */
580 bnet_sig(sd, BNET_TERMINATE);
583 /* Inform Director that we are done */
584 bnet_sig(dir, BNET_TERMINATE);
586 return jcr->JobStatus == JS_Terminated;
590 * Do a Verify for Director
593 static int verify_cmd(JCR *jcr)
595 BSOCK *dir = jcr->dir_bsock;
596 BSOCK *sd = jcr->store_bsock;
599 jcr->JobType = JT_VERIFY;
600 if (sscanf(dir->msg, verifycmd, level) != 1) {
601 bnet_fsend(dir, "2994 Bad verify command: %s\n", dir->msg);
604 if (strcasecmp(level, "init") == 0) {
605 jcr->JobLevel = L_VERIFY_INIT;
606 } else if (strcasecmp(level, "catalog") == 0){
607 jcr->JobLevel = L_VERIFY_CATALOG;
608 } else if (strcasecmp(level, "volume") == 0){
609 jcr->JobLevel = L_VERIFY_VOLUME_TO_CATALOG;
610 } else if (strcasecmp(level, "data") == 0){
611 jcr->JobLevel = L_VERIFY_DATA;
613 bnet_fsend(dir, "2994 Bad verify level: %s\n", dir->msg);
617 bnet_fsend(dir, OKverify);
618 Dmsg1(110, "bfiled>dird: %s", dir->msg);
620 switch (jcr->JobLevel) {
622 case L_VERIFY_CATALOG:
625 case L_VERIFY_VOLUME_TO_CATALOG:
626 if (!open_sd_read_session(jcr)) {
629 do_verify_volume(jcr);
631 * Send Close session command to Storage daemon
633 bnet_fsend(sd, read_close, jcr->Ticket);
634 Dmsg1(130, "bfiled>stored: %s", sd->msg);
636 /* ****FIXME**** check response */
637 bnet_recv(sd); /* get OK */
639 /* Inform Storage daemon that we are done */
640 bnet_sig(sd, BNET_TERMINATE);
644 bnet_fsend(dir, "2994 Bad verify level: %s\n", dir->msg);
648 /* Inform Director that we are done */
649 return bnet_sig(dir, BNET_TERMINATE);
653 * Do a Restore for Director
656 static int restore_cmd(JCR *jcr)
658 BSOCK *dir = jcr->dir_bsock;
659 BSOCK *sd = jcr->store_bsock;
663 * Scan WHERE (base directory for restore) from command
665 Dmsg0(150, "restore command\n");
666 /* Pickup where string */
667 where = get_memory(dir->msglen+1);
669 sscanf(dir->msg, restorecmd, where);
670 Dmsg1(150, "Got where=%s\n", where);
673 bnet_fsend(dir, OKrestore);
674 Dmsg1(110, "bfiled>dird: %s", dir->msg);
676 jcr->JobType = JT_RESTORE;
677 jcr->JobStatus = JS_Blocked;
679 if (!open_sd_read_session(jcr)) {
684 * Do restore of files and data
689 * Send Close session command to Storage daemon
691 bnet_fsend(sd, read_close, jcr->Ticket);
692 Dmsg1(130, "bfiled>stored: %s", sd->msg);
694 /* ****FIXME**** check response */
695 bnet_recv(sd); /* get OK */
697 /* Inform Storage daemon that we are done */
698 bnet_sig(sd, BNET_TERMINATE);
700 /* Inform Director that we are done */
701 bnet_sig(dir, BNET_TERMINATE);
703 Dmsg0(130, "Done in job.c\n");
707 static int open_sd_read_session(JCR *jcr)
709 BSOCK *sd = jcr->store_bsock;
712 Jmsg(jcr, M_FATAL, 0, _("Improper calling sequence.\n"));
715 Dmsg4(120, "VolSessId=%ld VolsessT=%ld SF=%ld EF=%ld\n",
716 jcr->VolSessionId, jcr->VolSessionTime, jcr->StartFile, jcr->EndFile);
717 Dmsg2(120, "JobId=%d vol=%s\n", jcr->JobId, "DummyVolume");
719 * Open Read Session with Storage daemon
721 bnet_fsend(sd, read_open, jcr->VolumeName,
722 jcr->VolSessionId, jcr->VolSessionTime, jcr->StartFile, jcr->EndFile,
723 jcr->StartBlock, jcr->EndBlock);
724 Dmsg1(110, ">stored: %s", sd->msg);
729 if (bnet_recv(sd) > 0) {
730 Dmsg1(110, "bfiled<stored: %s", sd->msg);
731 if (sscanf(sd->msg, OK_open, &jcr->Ticket) != 1) {
732 Jmsg(jcr, M_FATAL, 0, _("Bad response to SD read open: %s\n"), sd->msg);
735 Dmsg1(110, "bfiled: got Ticket=%d\n", jcr->Ticket);
737 Jmsg(jcr, M_FATAL, 0, _("Bad response from stored to read open command\n"));
741 if (!send_bootstrap_file(jcr)) {
746 * Start read of data with Storage daemon
748 bnet_fsend(sd, read_data, jcr->Ticket);
749 Dmsg1(110, ">stored: %s", sd->msg);
754 if (!response(sd, OK_data, "Read Data")) {
761 * Destroy the Job Control Record and associated
762 * resources (sockets).
764 static void filed_free_jcr(JCR *jcr)
766 if (jcr->store_bsock) {
767 bnet_close(jcr->store_bsock);
770 free_pool_memory(jcr->where);
772 if (jcr->RestoreBootstrap) {
773 unlink(jcr->RestoreBootstrap);
774 free_pool_memory(jcr->RestoreBootstrap);
776 if (jcr->last_fname) {
777 free_pool_memory(jcr->last_fname);
783 * Get response from Storage daemon to a command we
784 * sent. Check that the response is OK.
786 * Returns: 0 on failure
789 int response(BSOCK *sd, char *resp, char *cmd)
796 if ((n = bnet_recv(sd)) > 0) {
798 if (strcmp(sd->msg, resp) == 0) {
802 /* ********FIXME******** segfault if the following is executed */
804 Emsg3(M_FATAL, 0, _("<stored: bad response to %s: wanted: %s, got: %s\n"),
807 Emsg2(M_FATAL, 0, _("<stored: bad response to %s command: ERR=%s\n"),
808 cmd, bnet_strerror(sd));
813 static int send_bootstrap_file(JCR *jcr)
817 BSOCK *sd = jcr->store_bsock;
818 char *bootstrap = "bootstrap\n";
820 Dmsg1(400, "send_bootstrap_file: %s\n", jcr->RestoreBootstrap);
821 if (!jcr->RestoreBootstrap) {
824 bs = fopen(jcr->RestoreBootstrap, "r");
826 Jmsg(jcr, M_FATAL, 0, _("Could not open bootstrap file %s: ERR=%s\n"),
827 jcr->RestoreBootstrap, strerror(errno));
828 jcr->JobStatus = JS_ErrorTerminated;
831 strcpy(sd->msg, bootstrap);
832 sd->msglen = strlen(sd->msg);
834 while (fgets(buf, sizeof(buf), bs)) {
835 sd->msglen = Mmsg(&sd->msg, "%s", buf);
838 bnet_sig(sd, BNET_EOD);
840 if (!response(sd, OKSDbootstrap, "Bootstrap")) {
841 jcr->JobStatus = JS_ErrorTerminated;