add_prompt(ua, _("Replace")); /* 10 */
add_prompt(ua, _("JobId")); /* 11 */
}
+ if (jcr->JobType == JT_BACKUP || jcr->JobType == JT_RESTORE) {
+ add_prompt(ua, _("Plugin Options")); /* 12 */
+ }
switch (do_prompt(ua, "", _("Select parameter to modify"), NULL, 0)) {
case 0:
/* Level */
jcr->JobPriority = ua->pint32_val;
}
goto try_again;
- case 7:
+ case 7:
/* Pool or Bootstrap depending on JobType */
if (jcr->JobType == JT_BACKUP ||
jcr->JobType == JT_COPY ||
ua->send_msg(_("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
}
goto try_again;
+ case 12:
+ /* Plugin Options */
+ if (!get_cmd(ua, _("Please Plugin Options string: "))) {
+ break;
+ }
+ if (jcr->plugin_options) {
+ free(jcr->plugin_options);
+ jcr->plugin_options = NULL;
+ }
+ jcr->plugin_options = bstrdup(ua->cmd);
+ goto try_again;
case -1: /* error or cancel */
goto bail_out;
default:
rc.where = NULL;
}
-
if (rc.regexwhere) {
if (jcr->RegexWhere) {
free(jcr->RegexWhere);
"Pool: %s (From %s)\n"
"Storage: %s (From %s)\n"
"When: %s\n"
- "Priority: %d\n"),
+ "Priority: %d\n"
+ "%s%s%s"),
_("Backup"),
job->name(),
level_to_str(jcr->JobLevel),
NPRT(jcr->pool->name()), jcr->pool_source,
jcr->wstore?jcr->wstore->name():"*None*", jcr->wstore_source,
bstrutime(dt, sizeof(dt), jcr->sched_time),
- jcr->JobPriority);
+ jcr->JobPriority,
+ jcr->plugin_options?"Plugin Options: ":"",
+ jcr->plugin_options?jcr->plugin_options:"",
+ jcr->plugin_options?"\n":"");
} else { /* JT_VERIFY */
const char *Name;
if (jcr->verify_job) {
"Storage: %s\n"
"When: %s\n"
"Catalog: %s\n"
- "Priority: %d\n"),
+ "Priority: %d\n"
+ "Plugin Options: %s\n"),
job->name(),
NPRT(jcr->RestoreBootstrap),
jcr->RegexWhere?jcr->RegexWhere:job->RegexWhere,
jcr->rstore->name(),
bstrutime(dt, sizeof(dt), jcr->sched_time),
jcr->catalog->name(),
- jcr->JobPriority);
+ jcr->JobPriority,
+ NPRT(jcr->plugin_options));
} else {
ua->send_msg(_("Run Restore job\n"
"Storage: %s\n"
"When: %s\n"
"Catalog: %s\n"
- "Priority: %d\n"),
+ "Priority: %d\n"
+ "Plugin Options: %s\n"),
job->name(),
NPRT(jcr->RestoreBootstrap),
jcr->where?jcr->where:NPRT(job->RestoreWhere),
jcr->rstore->name(),
bstrutime(dt, sizeof(dt), jcr->sched_time),
jcr->catalog->name(),
- jcr->JobPriority);
+ jcr->JobPriority,
+ NPRT(jcr->plugin_options));
}
} else {
jcr->where?jcr->where:NPRT(job->RestoreWhere));
}
- ua->send_msg(_("Replace: %s\n"
- "Client: %s\n"
- "Storage: %s\n"
- "JobId: %s\n"
- "When: %s\n"
- "Catalog: %s\n"
- "Priority: %d\n"),
+ ua->send_msg(_("Replace: %s\n"
+ "Client: %s\n"
+ "Storage: %s\n"
+ "JobId: %s\n"
+ "When: %s\n"
+ "Catalog: %s\n"
+ "Priority: %d\n"
+ "Plugin Options: %s\n"),
replace,
jcr->client->name(),
jcr->rstore->name(),
jcr->RestoreJobId==0?"*None*":edit_uint64(jcr->RestoreJobId, ec1),
bstrutime(dt, sizeof(dt), jcr->sched_time),
jcr->catalog->name(),
- jcr->JobPriority);
+ jcr->JobPriority,
+ NPRT(jcr->plugin_options));
}
break;
case JT_COPY:
"pool", /* 22 */
"backupclient", /* 23 */
"restoreclient", /* 24 */
+ "pluginoptions", /* 25 */
NULL};
#define YES_POS 14
rc.restore_client_name = ua->argv[i];
kw_ok = true;
break;
+ case 25: /* pluginoptions */
+ if (rc.plugin_options) {
+ ua->send_msg(_("Plugin Options specified twice.\n"));
+ return false;
+ }
+ rc.plugin_options = ua->argv[i];
+ if (!acl_access_ok(ua, PluginOptions_ACL, rc.plugin_options)) {
+ ua->send_msg(_("No authoriztion for \"PluginOptions\" specification.\n"));
+ return false;
+ }
+ kw_ok = true;
+ break;
default:
break;
}