* 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 OKrestore[] = "2000 OK restore\n";
static char OKstore[] = "2000 OK storage\n";
+static char OKbootstrap[] = "2000 OK bootstrap\n";
/*
* Do a restore of the specified files
/*
* Now start a job with the Storage daemon
*/
- if (!start_storage_daemon_job(jcr, jcr->storage, SD_READ)) {
+ if (!start_storage_daemon_job(jcr, jcr->storage, NULL)) {
restore_cleanup(jcr, JS_ErrorTerminated);
return false;
}
}
Dmsg0(50, "Storage daemon connection OK\n");
+ if (!bnet_fsend(jcr->store_bsock, "run")) {
+ return false;
+ }
+
/*
* Start conversation with File daemon
*/
fd = jcr->file_bsock;
set_jcr_job_status(jcr, JS_Running);
-#ifdef xxx
- if (!send_include_list(jcr)) {
- restore_cleanup(jcr, JS_ErrorTerminated);
- return false;
- }
-
- if (!send_exclude_list(jcr)) {
- restore_cleanup(jcr, JS_ErrorTerminated);
- return false;
- }
-#endif
-
/*
* send Storage daemon address to the File daemon,
* then wait for File daemon to make connection
/*
* 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)) {
restore_cleanup(jcr, JS_ErrorTerminated);
return false;
}
jobstatus_to_ascii(jcr->FDJobStatus, fd_term_msg, sizeof(fd_term_msg));
jobstatus_to_ascii(jcr->SDJobStatus, sd_term_msg, sizeof(sd_term_msg));
- Jmsg(jcr, msg_type, 0, _("Bacula " VERSION " (" LSMDATE "): %s\n"
+ Jmsg(jcr, msg_type, 0, _("Bacula %s (%s): %s\n"
" JobId: %d\n"
" Job: %s\n"
" Client: %s\n"
" FD termination status: %s\n"
" SD termination status: %s\n"
" Termination: %s\n\n"),
+ VERSION,
+ LSMDATE,
edt,
jcr->jr.JobId,
jcr->jr.Job,