* Version $Id$
*/
/*
- Copyright (C) 2000-2005 Kern Sibbald
+ Copyright (C) 2000-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
/* Responses received from File daemon */
static char OKverify[] = "2000 OK verify\n";
static char OKstore[] = "2000 OK storage\n";
+static char OKbootstrap[] = "2000 OK bootstrap\n";
/* Forward referenced functions */
static void prt_fname(JCR *jcr);
* File daemon but not used).
*/
if (jcr->JobLevel == L_VERIFY_VOLUME_TO_CATALOG) {
- RESTORE_CTX rx;
- UAContext *ua;
- memset(&rx, 0, sizeof(rx));
- rx.bsr = new_bsr();
- rx.JobIds = "";
- rx.bsr->JobId = jcr->target_jr.JobId;
- ua = new_ua_context(jcr);
- complete_bsr(ua, rx.bsr);
- rx.bsr->fi = new_findex();
- rx.bsr->fi->findex = 1;
- rx.bsr->fi->findex2 = jcr->target_jr.JobFiles;
- jcr->ExpectedFiles = write_bsr_file(ua, rx);
- if (jcr->ExpectedFiles == 0) {
- free_ua_context(ua);
- free_bsr(rx.bsr);
+ if (!create_restore_bootstrap_file(jcr)) {
return false;
}
- if (jcr->RestoreBootstrap) {
- free(jcr->RestoreBootstrap);
- }
- POOLMEM *fname = get_pool_memory(PM_MESSAGE);
- make_unique_restore_filename(ua, &fname);
- jcr->RestoreBootstrap = bstrdup(fname);
- free_ua_context(ua);
- free_bsr(rx.bsr);
- free_pool_memory(fname);
- jcr->needs_sd = true;
-
} else {
jcr->sd_auth_key = bstrdup("dummy"); /* dummy Storage daemon key */
}
return false;
}
Dmsg0(50, "Storage daemon connection OK\n");
+
+ if (!bnet_fsend(jcr->store_bsock, "run")) {
+ return false;
+ }
}
/*
* OK, now connect to the File daemon
/*
* Send the bootstrap file -- what Volumes/files to restore
*/
- if (!send_bootstrap_file(jcr)) {
+ if (!send_bootstrap_file(jcr, fd) ||
+ !response(jcr, fd, OKbootstrap, "Bootstrap", DISPLAY_ERROR)) {
return false;
}