mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
28.58.2009 85f08bac6d325edb495f4be8ed4cc10a1b721f4a
Fix for issue 2793 (backup incremental : unexpected behavior when specifying empty directory)

Update the code to execute a full backup when there is no base backup in the provided path. A message is logged informing of this fallback behavior.
3 files modified
23 ■■■■ changed files
opendj-sdk/opends/src/messages/messages/jeb.properties 5 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/messages/messages/tools.properties 2 ●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/backends/jeb/BackupManager.java 16 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/messages/messages/jeb.properties
@@ -20,7 +20,7 @@
#
# CDDL HEADER END
#
#      Copyright 2006-2008 Sun Microsystems, Inc.
#      Copyright 2006-2009 Sun Microsystems, Inc.
@@ -354,4 +354,5 @@
  %d nodes evicted: %d BIN nodes stripped: %d
NOTICE_JEB_IMPORT_LDIF_EVICTION_DETECTED_190=Eviction detected after importing \
  %d entries
MILD_WARN_BACKUPDB_INCREMENTAL_NOT_FOUND_DOING_NORMAL_191=Could not find any \
 backup in '%s'.  A full backup will be executed
opendj-sdk/opends/src/messages/messages/tools.properties
@@ -2466,4 +2466,4 @@
SEVERE_ERR_LDAPCOMPARE_ERROR_READING_FILE_1668=An error occurred reading file \
 '%s'.  Check that the file exists and that you have read access rights to \
 it.  Details: %s
 it.  Details: %s
opendj-sdk/opends/src/server/org/opends/server/backends/jeb/BackupManager.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 */
package org.opends.server.backends.jeb;
import org.opends.messages.Message;
@@ -269,7 +269,19 @@
      }
*/
      baseBackup = getBackupInfo(backupDir, incrBaseID);
      if (incrBaseID == null)
      {
        // No incremental backup ID: log a message informing that a backup
        // could not be found and that a normal backup will be done.
        incremental = false;
        Message message = WARN_BACKUPDB_INCREMENTAL_NOT_FOUND_DOING_NORMAL.get(
            backupDir.getPath());
        logError(message);
      }
      else
      {
        baseBackup = getBackupInfo(backupDir, incrBaseID);
      }
    }
    // Get information about the latest log file from the base backup.