void restore_cleanup(JCR *jcr, int TermCode)
{
POOL_MEM where;
+ CLIENT_DBR cr;
char creplace;
const char *replace = NULL;
char sdt[MAX_TIME_LENGTH], edt[MAX_TIME_LENGTH];
Dmsg0(20, "In restore_cleanup\n");
update_job_end(jcr, TermCode);
+ memset(&cr, 0, sizeof(cr));
+ bstrncpy(cr.Name, jcr->client->name(), sizeof(cr.Name));
+ if (!db_get_client_record(jcr, jcr->db, &cr)) {
+ Jmsg(jcr, M_WARNING, 0, _("Error getting Client record for Job report: ERR=%s"),
+ db_strerror(jcr->db));
+ }
+
if (jcr->component_fd) {
fclose(jcr->component_fd);
jcr->component_fd = NULL;
" Build OS: %s %s %s\n"
" JobId: %d\n"
" Job: %s\n"
-" Restore Client: %s\n"
+" Restore Client: \"%s\" %s\n"
" Where: %s\n"
" Replace: %s\n"
" Start time: %s\n"
HOST_OS, DISTNAME, DISTVER,
jcr->jr.JobId,
jcr->jr.Job,
- jcr->client->name(),
+ jcr->client->name(), cr.Uname,
where.c_str(),
replace,
sdt,