From: Thorsten Engel Date: Mon, 20 Jun 2005 12:25:42 +0000 (+0000) Subject: added VSS toggling by enable_vss X-Git-Tag: Release-1.38.0~354 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1ac89dd7d553c16b51a74e2d4fcd3719528c4e6c;p=bacula%2Fbacula added VSS toggling by enable_vss git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2150 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index 4665fceebc..f17f9a2385 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -1205,7 +1205,7 @@ static int backup_cmd(JCR *jcr) #ifdef WIN32_VSS /* START VSS ON WIN 32 */ - if (g_pVSSClient) { + if (g_pVSSClient && enable_vss == 1) { if (g_pVSSClient->InitializeForBackup()) { /* tell vss which drives to snapshot */ char szWinDriveLetters[27]; @@ -1294,7 +1294,7 @@ cleanup: #ifdef WIN32_VSS /* STOP VSS ON WIN 32 */ /* tell vss to close the backup session */ - if (g_pVSSClient) + if (g_pVSSClient && enable_vss == 1) g_pVSSClient->CloseBackup(); #endif diff --git a/bacula/src/win32/compat/compat.cpp b/bacula/src/win32/compat/compat.cpp index 18d1ec6ec4..32418d2df3 100644 --- a/bacula/src/win32/compat/compat.cpp +++ b/bacula/src/win32/compat/compat.cpp @@ -44,6 +44,7 @@ extern void d_msg(const char *file, int line, int level, const char *fmt,...); extern DWORD g_platform_id; +extern int enable_vss; // from MicroSoft SDK (KES) is the diff between Jan 1 1601 and Jan 1 1970 #ifdef HAVE_MINGW @@ -85,7 +86,7 @@ cygwin_conv_to_win32_path(const char *name, char *win32_name, DWORD dwSize) \\\\?\\GLOBALROOT\\Device\\HarddiskVolumeShadowCopy1\\bacula\\uninstall.exe from c:\bacula\uninstall.exe */ - if (g_pVSSClient) { + if (g_pVSSClient && enable_vss == 1) { POOLMEM* pszBuf = get_pool_memory (PM_FNAME); pszBuf = check_pool_memory_size(pszBuf, dwSize); bstrncpy (pszBuf, tname, strlen(tname)+1);