* Now send JobId and authorization key
*/
fd->fsend(jobcmd, edit_int64(jcr->JobId, ed1), jcr->Job, jcr->VolSessionId,
- jcr->VolSessionTime, jcr->sd_auth_key);
- if (strcmp(jcr->sd_auth_key, "dummy") != 0) {
+ jcr->VolSessionTime, jcr->sd_auth_key);
+ if (!jcr->keep_sd_auth_key && strcmp(jcr->sd_auth_key, "dummy")) {
memset(jcr->sd_auth_key, 0, strlen(jcr->sd_auth_key));
}
Dmsg1(100, ">filed: %s", fd->msg);
bool send_level_command(JCR *jcr)
{
BSOCK *fd = jcr->file_bsock;
- const char *accurate = jcr->job->accurate?"accurate_":"";
+ const char *accurate = jcr->accurate?"accurate_":"";
const char *not_accurate = "";
/*
* Send Level command to File daemon
ie = fileset->exclude_items[i];
fd->fsend("E\n");
}
+ if (ie->ignoredir) {
+ bnet_fsend(fd, "Z %s\n", ie->ignoredir);
+ }
for (j=0; j<ie->num_opts; j++) {
FOPTS *fo = ie->opts_list[j];
fd->fsend("O %s\n", fo->opts);
if (fo->plugin) {
fd->fsend("G %s\n", fo->plugin);
}
- if (fo->ignoredir) {
- bnet_fsend(fd, "Z %s\n", fo->ignoredir);
- }
if (fo->reader) {
fd->fsend("D %s\n", fo->reader);
}
return true;
}
-
-/*
- * Send bootstrap file if any to the socket given (FD or SD).
- * This is used for restore, verify VolumeToCatalog, and
- * for migration.
- */
-bool send_bootstrap_file(JCR *jcr, BSOCK *sock)
-{
- FILE *bs;
- char buf[1000];
- const char *bootstrap = "bootstrap\n";
-
- Dmsg1(400, "send_bootstrap_file: %s\n", jcr->RestoreBootstrap);
- if (!jcr->RestoreBootstrap) {
- return true;
- }
- bs = fopen(jcr->RestoreBootstrap, "rb");
- if (!bs) {
- berrno be;
- Jmsg(jcr, M_FATAL, 0, _("Could not open bootstrap file %s: ERR=%s\n"),
- jcr->RestoreBootstrap, be.bstrerror());
- set_jcr_job_status(jcr, JS_ErrorTerminated);
- return false;
- }
- sock->fsend(bootstrap);
- while (fgets(buf, sizeof(buf), bs)) {
- sock->fsend("%s", buf);
- }
- sock->signal(BNET_EOD);
- fclose(bs);
- if (jcr->unlink_bsr) {
- unlink(jcr->RestoreBootstrap);
- jcr->unlink_bsr = false;
- }
- return true;
-}
-
/* TODO: drop this with runscript.old_proto in bacula 1.42 */
static char runbefore[] = "RunBeforeJob %s\n";
static char runafter[] = "RunAfterJob %s\n";