/* Imported functions */
extern int status_cmd(JCR *jcr);
extern int qstatus_cmd(JCR *jcr);
+extern int accurate_cmd(JCR *jcr);
/* Forward referenced functions */
static int backup_cmd(JCR *jcr);
{"RunBeforeJob", runbefore_cmd, 0},
{"RunAfterJob", runafter_cmd, 0},
{"Run", runscript_cmd, 0},
+ {"accurate", accurate_cmd, 0},
{NULL, NULL} /* list terminator */
};
for (k=0; k<fo->regex.size(); k++) {
regfree((regex_t *)fo->regex.get(k));
}
+ for (k=0; k<fo->regexdir.size(); k++) {
+ regfree((regex_t *)fo->regexdir.get(k));
+ }
+ for (k=0; k<fo->regexfile.size(); k++) {
+ regfree((regex_t *)fo->regexfile.get(k));
+ }
fo->regex.destroy();
fo->regexdir.destroy();
fo->regexfile.destroy();
fo->base.destroy();
fo->fstype.destroy();
fo->drivetype.destroy();
+ if (fo->ignoredir != NULL) {
+ free(fo->ignoredir);
+ }
}
incexe->opts_list.destroy();
incexe->name_list.destroy();
}
break;
case '<':
- Dmsg0(100, "Doing < include on client.\n");
+ Dmsg1(100, "Doing < of '%s' include on client.\n", p + 1);
p++; /* skip over < */
if ((ffd = fopen(p, "rb")) == NULL) {
berrno be;
set_options(current_opts, item);
state = state_options;
break;
+ case 'Z':
+ current_opts = start_options(ff);
+ current_opts->ignoredir = bstrdup(item);
+ state = state_options;
+ break;
case 'D':
current_opts = start_options(ff);
// current_opts->reader = bstrdup(item);
for (k=0; k<fo->drivetype.size(); k++) {
Dmsg1(400, "XD %s\n", (char *)fo->drivetype.get(k));
}
+ if (fo->ignoredir) {
+ Dmsg1(400, "Z %s\n", fo->ignoredir);
+ }
}
dlistString *node;
foreach_dlist(node, &incexe->name_list) {
}
fo->VerifyOpts[j] = 0;
break;
+ case 'C': /* accurate options */
+ /* Copy Accurate Options */
+ for (j=0; *p && *p != ':'; p++) {
+ fo->AccurateOpts[j] = *p;
+ if (j < (int)sizeof(fo->AccurateOpts) - 1) {
+ j++;
+ }
+ }
+ fo->AccurateOpts[j] = 0;
+ break;
case 'P': /* strip path */
/* Get integer */
p++; /* skip P */
case 'c':
fo->flags |= FO_CHKCHANGES;
break;
+ case 'N':
+ fo->flags |= FO_HONOR_NODUMP;
+ break;
default:
Emsg1(M_ERROR, 0, _("Unknown include/exclude option: %c\n"), *p);
break;
level = get_memory(dir->msglen+1);
Dmsg1(110, "level_cmd: %s", dir->msg);
+ if (strstr(dir->msg, "accurate")) {
+ jcr->accurate = true;
+ }
if (sscanf(dir->msg, "level = %s ", level) != 1) {
goto bail_out;
}
/* Full backup requested? */
} else if (strcmp(level, "full") == 0) {
jcr->JobLevel = L_FULL;
- } else if (strcmp(level, "differential") == 0) {
+ } else if (strstr(level, "differential")) {
jcr->JobLevel = L_DIFFERENTIAL;
free_memory(level);
return 1;
- } else if (strcmp(level, "incremental") == 0) {
+ } else if (strstr(level, "incremental")) {
jcr->JobLevel = L_INCREMENTAL;
free_memory(level);
- return 1;
+ return 1;
/*
* We get his UTC since time, then sync the clocks and correct it
* to agree with our clock.
berrno be;
Jmsg(jcr, M_WARNING, 0, _("VSS was not initialized properly. VSS support is disabled. ERR=%s\n"), be.bstrerror());
}
+ run_scripts(jcr, jcr->RunScripts, "ClientAfterVSS");
}
#endif