}
}
+ if (jcr->JobId) { /* send EndJob if running a job */
+ char ed1[50], ed2[50];
+ /* Send termination status back to Dir */
+ bnet_fsend(dir, EndJob, jcr->JobStatus, jcr->JobFiles,
+ edit_uint64(jcr->ReadBytes, ed1),
+ edit_uint64(jcr->JobBytes, ed2), jcr->Errors, jcr->VSS,
+ jcr->pki_encrypt);
+ Dmsg1(110, "End FD msg: %s\n", dir->msg);
+ }
+
/* Inform Storage daemon that we are done */
if (jcr->store_bsock) {
bnet_sig(jcr->store_bsock, BNET_TERMINATE);
const char *p;
char strip[100];
+#ifdef HAVE_WIN32
+ fo->flags |= FO_IGNORECASE; /* always ignorecase under windows */
+#endif
+
for (p=opts; *p; p++) {
switch (*p) {
case 'a': /* alway replace */
BSOCK *sd = jcr->store_bsock;
int ok = 0;
int SDJobStatus;
- char ed1[50], ed2[50];
- bool bDoVSS = false;
#if defined(WIN32_VSS)
// capture state here, if client is backed up by multiple directors
// and one enables vss and the other does not then enable_vss can change
// between here and where its evaluated after the job completes.
- bDoVSS = g_pVSSClient && enable_vss;
- if (bDoVSS) {
+ jcr->VSS = g_pVSSClient && enable_vss;
+ if (jcr->VSS) {
/* Run only one at a time */
P(vss_mutex);
}
#if defined(WIN32_VSS)
/* START VSS ON WIN 32 */
- if (bDoVSS) {
+ if (jcr->VSS) {
if (g_pVSSClient->InitializeForBackup()) {
/* tell vss which drives to snapshot */
char szWinDriveLetters[27];
#if defined(WIN32_VSS)
/* STOP VSS ON WIN 32 */
/* tell vss to close the backup session */
- if (bDoVSS) {
+ if (jcr->VSS) {
if (g_pVSSClient->CloseBackup()) {
/* inform user about writer states */
for (int i=0; i<(int)g_pVSSClient->GetWriterCount(); i++) {
}
#endif
- bnet_fsend(dir, EndJob, jcr->JobStatus, jcr->JobFiles,
- edit_uint64(jcr->ReadBytes, ed1),
- edit_uint64(jcr->JobBytes, ed2), jcr->Errors, (int)bDoVSS,
- jcr->pki_encrypt);
- Dmsg1(110, "End FD msg: %s\n", dir->msg);
-
return 0; /* return and stop command loop */
}
{
BSOCK *dir = jcr->dir_bsock;
BSOCK *sd = jcr->store_bsock;
- char level[100], ed1[50], ed2[50];
+ char level[100];
jcr->JobType = JT_VERIFY;
if (sscanf(dir->msg, verifycmd, level) != 1) {
bnet_sig(dir, BNET_EOD);
- /* Send termination status back to Dir */
- bnet_fsend(dir, EndJob, jcr->JobStatus, jcr->JobFiles,
- edit_uint64(jcr->ReadBytes, ed1),
- edit_uint64(jcr->JobBytes, ed2), jcr->Errors, 0,
- jcr->pki_encrypt);
- Dmsg1(110, "End FD msg: %s\n", dir->msg);
-
- /* Inform Director that we are done */
- bnet_sig(dir, BNET_TERMINATE);
return 0; /* return and terminate command loop */
}
bool use_regexwhere=false;
int prefix_links;
char replace;
- char ed1[50], ed2[50];
/*
* Scan WHERE (base directory for restore) from command
if (jcr->Errors) {
set_jcr_job_status(jcr, JS_ErrorTerminated);
}
- /* Send termination status back to Dir */
- bnet_fsend(dir, EndJob, jcr->JobStatus, jcr->JobFiles,
- edit_uint64(jcr->ReadBytes, ed1),
- edit_uint64(jcr->JobBytes, ed2), jcr->Errors, 0,
- jcr->pki_encrypt);
- Dmsg1(110, "End FD msg: %s\n", dir->msg);
-
- /* Inform Director that we are done */
- bnet_sig(dir, BNET_TERMINATE);
Dmsg0(130, "Done in job.c\n");
return 0; /* return and terminate command loop */