]> git.sur5r.net Git - bacula/bacula/commitdiff
Ensure log files in first backup are restored
authorJames Harper <james.harper@bendigoit.com.au>
Sun, 16 Oct 2011 11:34:01 +0000 (13:34 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:50:03 +0000 (14:50 +0200)
bacula/src/win32/filed/plugins/exchange-fd.c
bacula/src/win32/filed/plugins/storage_group_node.c

index 8e654fb837694619e6112f5b5c8fbc00d4d974e1..1fd0541375a529dd19e952e2b15426f0ab952d0b 100644 (file)
@@ -65,6 +65,7 @@ static bRC startRestoreFile(bpContext *ctx, const char *cmd);
 static bRC endRestoreFile(bpContext *ctx);
 static bRC createFile(bpContext *ctx, struct restore_pkt *rp);
 static bRC setFileAttributes(bpContext *ctx, struct restore_pkt *rp);
+static bRC checkFile(bpContext *ctx, char *fname);
 
 static pFuncs pluginFuncs = {
    sizeof(pluginFuncs),
@@ -82,7 +83,8 @@ static pFuncs pluginFuncs = {
    endRestoreFile,
    pluginIO,
    createFile,
-   setFileAttributes
+   setFileAttributes,
+   checkFile,
 };
 
 extern "C" {
@@ -512,3 +514,12 @@ static bRC setFileAttributes(bpContext *ctx, struct restore_pkt *rp)
    _DebugMessage(100, "setFileAttributes\n");
    return bRC_OK;
 }
+
+static bRC checkFile(bpContext *ctx, char *fname)
+{
+   exchange_fd_context_t *context = (exchange_fd_context_t *)ctx->pContext;
+   _DebugMessage(100, "checkFile\n");
+   /* previous files are always Seen */
+   return bRC_Seen;
+}
+
index e4a8fcdce00de019c90e0fbea348602540c9da3a..a194e5448f3d004af6f67cee1659ae0744174cc7 100644 (file)
@@ -168,7 +168,7 @@ storage_group_node_t::startBackupFile(exchange_fd_context_t *context, struct sav
             {
                if (GetFileTime(handle, NULL, NULL, &modified_time) == 0)
                {
-                  //_JobMessage(M_WARNING, "Could check last modified date for '%S' (0x%08x), including anyway\n", tmp_logfile_ptr, GetLastError());
+                  //_JobMessage(M_WARNING, "Could not check last modified date for '%S' (0x%08x), including anyway\n", tmp_logfile_ptr, GetLastError());
                   include_file = true;
                }
             }
@@ -188,6 +188,8 @@ storage_group_node_t::startBackupFile(exchange_fd_context_t *context, struct sav
                logfile_ptr += wcslen(logfile_ptr) + 1;
                //_DebugMessage(100, "Including file %S\n", logfile_ptr);
             }
+#if 0
+/* this is handled via checkFile now */
             else
             {
                if (context->accurate) {
@@ -198,6 +200,7 @@ storage_group_node_t::startBackupFile(exchange_fd_context_t *context, struct sav
                   delete tmp;
                }
             }
+#endif
 
             if (handle != INVALID_HANDLE_VALUE)
                CloseHandle(handle);