Upgrading to OpenDJ <?eval ${docTargetVersion}?> Upgrading This chapter covers upgrade from OpenDJ 2.4.5 and later versions. For upgrades from earlier versions, upgrade first to at least OpenDJ 2.4.5, and then follow the procedures in this chapter. See Upgrading OpenDJ Directory Server in the OpenDJ Wiki for details on upgrading to OpenDJ 2.4.5 from earlier versions. Before You Upgrade Prepare to perform the upgrade procedure as the user who owns the OpenDJ server files. Make sure you have the credentials to run commands as the user who owns the server. In order to revert if the upgrade fails, make sure you perform a full backup of your current OpenDJ installation. It might be most expedient to back up the file system directory where the current OpenDJ server is installed as part of the upgrade process. Alternatively, see Backing Up & Restoring Data for instructions. To Upgrade an OpenDJ Directory Server To upgrade OpenDJ directory server installed from native packages (.deb, .rpm), use the command-line package management tools provided by the system. The following steps describe how to upgrade OpenDJ directory server installed from the cross-platform (.zip) delivery. Login as the user who owns the current OpenDJ server. Stop the current OpenDJ server. If you have not already backed up the current OpenDJ server, make a back up copy of the directory where OpenDJ is installed. If OpenDJ is currently installed in a directory such as OpenDJ-2.4.5, you can change the directory name to opendj to make it easier to unpack subsequent .zip deliveries for future upgrades. Unpack the new files from the .zip delivery over the current server files. If your directory is not named opendj, then you can first unpack the files, then copy everything in the opendj over the current server files. Run the upgrade command to bring OpenDJ configuration and application data up to date with the new binary and script files that you copied over the current server files. By default, the upgrade command requests confirmation before making important configuration changes. You can use the option to run the command non-interactively, with the option to accept the license terms non-interactively. When using the option, if the upgrade command cannot complete because it requires confirmation for a potentially very long or critical task, then it exits with an error and a message about how to finish making the changes. You can add the option to force a non-interactive upgrade to continue in this case, also performing long running and critical tasks. When you upgrade from OpenDJ 2.5.0-Xpress1, you must rebuild the ds-sync-hist ordering index before you restart the server, as indicated in the message from the upgrade tool. OpenDJ 2.5.0-Xpress1 introduced a regression in the ds-sync-hist ordering index. This index must be rebuilt after the upgrade has completed and before restarting OpenDJ. Do you wish to continue? (yes/no) [no]: yes To rebuild the index, use the rebuild-index command after upgrade but before starting the server as in the following example. $ ./opendj/bin/rebuild-index --baseDN dc=example,dc=com --index ds-sync-hist ... msg=Rebuild of index(es) ds-sync-hist started ... ... msg=Rebuild complete. Processed XXX entries in YYY seconds... Start the upgraded OpenDJ server. At this point the upgrade process is complete. See the resulting upgrade.log file for a full list of operations performed. Upgrading From OpenDJ 2.4.5 The following example upgrades an OpenDJ 2.4.5 directory server installed in /path/to/OpenDJ-2.4.5, backing up the current server directory in case the upgrade process fails, and changing the directory name to /path/to/opendj to simplify future upgrades. To Upgrade Replicated Servers Upgrade each server sequentially, as described above. To Upgrade OpenDJ DSML Gateway Replace the gateway web application with the newer version, as for a fresh installation.