From: Kern Sibbald Date: Mon, 12 Jul 2010 07:59:31 +0000 (+0200) Subject: Add bEventVssBeforeCloseRestore per James X-Git-Tag: Release-5.2.1~955 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=66a60c493f678b3a884c7c66a2a0b67b8c275627;p=bacula%2Fbacula Add bEventVssBeforeCloseRestore per James --- diff --git a/bacula/src/filed/fd_plugins.h b/bacula/src/filed/fd_plugins.h index 059636e05d..65d9ce430b 100644 --- a/bacula/src/filed/fd_plugins.h +++ b/bacula/src/filed/fd_plugins.h @@ -195,13 +195,14 @@ typedef enum { bEventRestoreCommand = 10, bEventLevel = 11, bEventSince = 12, - bEventCancelCommand = 13, /* Executed by an other thread */ + bEventCancelCommand = 13, /* Executed by another thread */ bEventVssBackupAddComponents = 14, bEventVssRestoreLoadComponentMetadata = 15, bEventVssRestoreSetComponentsSelected = 16, bEventRestoreObject = 17, bEventEndFileSet = 18, - bEventPluginCommand = 19 /* Sent during FileSet creation */ + bEventPluginCommand = 19, /* Sent during FileSet creation */ + bEventVssBeforeCloseRestore = 20 } bEventType; typedef struct s_bEvent { diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index 13e09472f7..2fb991256f 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -2154,11 +2154,12 @@ static int restore_cmd(JCR *jcr) #if defined(WIN32_VSS) /* STOP VSS ON WIN32 */ /* tell vss to close the restore session */ - Dmsg0(0, "About to call CloseRestore\n"); + Dmsg0(100, "About to call CloseRestore\n"); if (jcr->VSS) { - Dmsg0(0, "Really about to call CloseRestore\n"); + generate_plugin_event(jcr, bEventVssBeforeCloseRestore); + Dmsg0(100, "Really about to call CloseRestore\n"); if (g_pVSSClient->CloseRestore()) { - Dmsg0(0, "CloseRestore success\n"); + Dmsg0(100, "CloseRestore success\n"); /* inform user about writer states */ for (int i=0; i<(int)g_pVSSClient->GetWriterCount(); i++) { int msg_type = M_INFO; @@ -2170,7 +2171,7 @@ static int restore_cmd(JCR *jcr) } } else - Dmsg1(0, "CloseRestore fail - %08x\n", errno); + Dmsg1(100, "CloseRestore fail - %08x\n", errno); V(vss_mutex); } #endif