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

kenneth_suter
31.23.2007 17b9ab961446c89061229396a2cb00a3976fe87e
This commit essentially removes the step of backing up the databases as part of an upgrade.  There are concerns that this may take a long time or eat up lots of resources in cases where there is alot of data.  Also if the data is important it is likely that there will be a separate backup strategy for this.

Since it might be nice to offer to do this as an optional step in the future, I have not removed the code altogether but rather surrounded the backup invocation code with a conditional that is always false right now. When we can resolve where in the GUI to offer such a checkbox for managing the value of this value there will be no change necessary to the Upgrader class.
2 files modified
41 ■■■■■ changed files
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeUserData.java 11 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java 30 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeUserData.java
@@ -76,4 +76,15 @@
    this.buildToDownload = build;
  }
  /**
   * Indicates whether or not the upgrader should perform a
   * backup of the databases as part of the upgrade.
   * @return boolean where true indicates that the databases
   * should be backed up
   */
  public boolean getPerformDatabaseBackup() {
    // It would be nice to make this an option (see issue 1740)
    return false;
  }
}
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/Upgrader.java
@@ -137,11 +137,11 @@
            "summary-upgrade-calculating-schema-customization", 40),
    CALCULATING_CONFIGURATION_CUSTOMIZATIONS(
            "summary-upgrade-calculating-config-customization", 45),
            "summary-upgrade-calculating-config-customization", 48),
    BACKING_UP_DATABASES("summary-upgrade-backing-up-db", 50),
    BACKING_UP_FILESYSTEM("summary-upgrade-backing-up-files",55),
    BACKING_UP_FILESYSTEM("summary-upgrade-backing-up-files",52),
    UPGRADING_COMPONENTS("summary-upgrade-upgrading-components", 60),
@@ -796,18 +796,20 @@
      checkAbort();
      try {
        LOG.log(Level.INFO, "backing up databases");
        setCurrentProgressStep(UpgradeProgressStep.BACKING_UP_DATABASES);
        backupDatabases();
        notifyListeners(formatter.getFormattedDone() +
                formatter.getLineBreak());
        LOG.log(Level.INFO, "database backup finished");
      } catch (ApplicationException e) {
        notifyListeners(formatter.getFormattedError() +
                formatter.getLineBreak());
        LOG.log(Level.INFO, "Error backing up databases", e);
        throw e;
      if (getUpgradeUserData().getPerformDatabaseBackup()) {
        try {
          LOG.log(Level.INFO, "backing up databases");
          setCurrentProgressStep(UpgradeProgressStep.BACKING_UP_DATABASES);
          backupDatabases();
          notifyListeners(formatter.getFormattedDone() +
                  formatter.getLineBreak());
          LOG.log(Level.INFO, "database backup finished");
        } catch (ApplicationException e) {
          notifyListeners(formatter.getFormattedError() +
                  formatter.getLineBreak());
          LOG.log(Level.INFO, "Error backing up databases", e);
          throw e;
        }
      }
      checkAbort();