/*
Bacula® - The Network Backup Solution
- Copyright (C) 2001-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2001-2010 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
*
* Kern Sibbald, December MMI
*
- * Version $Id$
*/
#include "bacula.h"
rc.level_name = NULL;
}
if (rc.jid) {
- /* Note, this is also MigrateJobId */
+ /* Note, this is also MigrateJobId and a VerifyJobId */
jcr->RestoreJobId = str_to_int64(rc.jid);
rc.jid = 0;
}
static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, const char *verify_list,
char *jid, const char *replace, char *client_name)
{
+ char ec1[30];
+ char dt[MAX_TIME_LENGTH];
+
Dmsg1(800, "JobType=%c\n", jcr->getJobType());
switch (jcr->getJobType()) {
- char ec1[30];
- char dt[MAX_TIME_LENGTH];
case JT_ADMIN:
if (ua->api) ua->signal(BNET_RUN_CMD);
ua->send_msg(_("Run %s job\n"
jcr->plugin_options?jcr->plugin_options:"",
jcr->plugin_options?"\n":"");
} else { /* JT_VERIFY */
+ JOB_DBR jr;
const char *Name;
if (jcr->verify_job) {
Name = jcr->verify_job->name();
+ } else if (jcr->RestoreJobId) { /* Display job name if jobid requested */
+ memset(&jr, 0, sizeof(jr));
+ jr.JobId = jcr->RestoreJobId;
+ if (!db_get_job_record(jcr, ua->db, &jr)) {
+ ua->error_msg(_("Could not get job record for selected JobId. ERR=%s"),
+ db_strerror(ua->db));
+ return false;
+ }
+ Name = jr.Job;
} else {
Name = "";
}