]> git.sur5r.net Git - bacula/bacula/commitdiff
added VSS toggling by enable_vss
authorThorsten Engel <thorsten.engel@matrix-computer.com>
Mon, 20 Jun 2005 12:25:42 +0000 (12:25 +0000)
committerThorsten Engel <thorsten.engel@matrix-computer.com>
Mon, 20 Jun 2005 12:25:42 +0000 (12:25 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2150 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/filed/job.c
bacula/src/win32/compat/compat.cpp

index 4665fceebcb79973200c09e9697d3f4b6941cc3b..f17f9a2385a0454932961630ca9b043b0a655840 100644 (file)
@@ -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
 
index 18d1ec6ec4cd0a3852d759e4fb8ec82e08f46811..32418d2df38fbbc9445eff28a0dfea729285457b 100644 (file)
@@ -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);