ff_pkt->link = link.c_str();
ff_pkt->type = sp.type;
ff_pkt->object = sp.object;
+ ff_pkt->object_len = sp.object_len;
if (sp.type == FT_RESTORE_FIRST) {
ff_pkt->LinkFI = sp.index; /* restore object index */
}
memcpy(&ff_pkt->statp, &sp.statp, sizeof(ff_pkt->statp));
- Dmsg1(dbglvl, "Save_file: file=%s\n", fname.c_str());
+ Dmsg2(dbglvl, "startBackup returned type=%d, fname=%s\n", sp.type, sp.fname);
+ if (sp.object) {
+ Dmsg2(dbglvl, "index=%d object=%s\n", sp.index, sp.object);
+ }
save_file(jcr, ff_pkt, true);
bRC rc = plug_func(plugin)->endBackupFile(jcr->plugin_ctx);
if (rc == bRC_More || rc == bRC_OK) {
sd->bstrerror());
return false;
}
- Dmsg1(50, "send: %s\n", sd->msg);
+ Dmsg1(50, "send plugin name hdr: %s\n", sd->msg);
if (start) {
/* Send data -- not much */
sd->bstrerror());
return false;
}
- Dmsg1(dbglvl, "send: %s\n", sd->msg);
+ Dmsg1(dbglvl, "send plugin start/end: %s\n", sd->msg);
sd->signal(BNET_EOD); /* indicate end of plugin name data */
return true;
}
rp.RegexWhere = jcr->RegexWhere;
rp.replace = jcr->replace;
rp.create_status = CF_ERROR;
- Dmsg1(dbglvl, "call plugin createFile=%s\n", rp.ofname);
+ Dmsg4(dbglvl, "call plugin createFile stream=%d type=%d LinkFI=%d File=%s\n",
+ rp.stream, rp.type, rp.LinkFI, rp.ofname);
+ if (rp.attrEx) {
+ Dmsg1(dbglvl, "attrEx=\"%s\"\n", rp.attrEx);
+ }
rc = plug_func(plugin)->createFile(plugin_ctx, &rp);
if (rc != bRC_OK) {
Qmsg2(jcr, M_ERROR, 0, _("Plugin createFile call failed. Stat=%d file=%s\n"),
if (rp.create_status == CF_CREATED) {
return rp.create_status; /* yes, no need to bopen */
}
+ if (rp.type == FT_RESTORE_FIRST) {
+ return CF_CREATED;
+ }
flags = O_WRONLY | O_CREAT | O_TRUNC | O_BINARY;
Dmsg0(dbglvl, "call bopen\n");
Dmsg0(dbglvl, "plugin list is NULL\n");
return;
}
- if (jcr->is_job_canceled()) {
+ if (jcr->is_job_canceled() || jcr->JobId == 0) {
return;
}
{
JCR *jcr;
bacula_ctx *bctx;
- if (ctx) {
+ if (!ctx) {
return bRC_Error;
}
if (!file) {