}
memset(&rjr, 0, sizeof(rjr));
- jcr->jr.Level = 'F'; /* Full restore */
+ jcr->jr.Level = L_FULL; /* Full restore */
jcr->jr.StartTime = jcr->start_time;
if (!db_update_job_start_record(jcr, jcr->db, &jcr->jr)) {
Jmsg(jcr, M_ERROR, 0, "%s", db_strerror(jcr->db));
/*
* The following code is kept temporarily for compatibility.
* It is the predecessor to the Bootstrap file.
+ * DEPRECATED
*/
if (!jcr->RestoreBootstrap) {
/*
*
*/
Dmsg0(10, "Open connection with storage daemon\n");
- set_jcr_job_status(jcr, JS_Blocked);
+ set_jcr_job_status(jcr, JS_WaitSD);
/*
* Start conversation with Storage daemon
*/
/*
* Start conversation with File daemon
*/
+ set_jcr_job_status(jcr, JS_WaitFD);
if (!connect_to_file_daemon(jcr, 10, FDConnectTimeout, 1)) {
restore_cleanup(jcr, JS_ErrorTerminated);
return 0;
* then wait for File daemon to make connection
* with Storage daemon.
*/
- set_jcr_job_status(jcr, JS_Blocked);
if (jcr->store->SDDport == 0) {
jcr->store->SDDport = jcr->store->SDport;
}
restore_cleanup(jcr, JS_ErrorTerminated);
return 0;
}
- set_jcr_job_status(jcr, JS_Running);
/*
* Send the bootstrap file -- what Volumes/files to restore
}
}
+ if (!send_run_before_and_after_commands(jcr)) {
+ restore_cleanup(jcr, JS_ErrorTerminated);
+ return 0;
+ }
+
/* Send restore command */
char replace, *where;
} else {
where = ""; /* None */
}
+ jcr->prefix_links = jcr->job->PrefixLinks;
bash_spaces(where);
bnet_fsend(fd, restorecmd, replace, jcr->prefix_links, where);
unbash_spaces(where);