Upgrade a single instance

This section describes how to upgrade a single Neo4j instance.

1. Prerequisites

  1. Verify that you have installed Java 11.

  2. Review the improvements and fixes that have been carried out in the version that you want to upgrade to. See the Neo4j 4.4 Change log.

  3. Ensure that you have completed all tasks on the Upgrade checklist.

2. Prepare for the upgrade

  1. Install the Neo4j version that you want to upgrade to. For more information on how to install the distribution that you are using, see Operations Manual → Installation.

  2. Update the neo4j.conf file as per the notes that you have prepared in section Prepare a new neo4j.conf file to be used by the new installation.

  3. Set dbms.allow_upgrade=true to allow automatic store upgrade.

  4. Set dbms.mode=SINGLE. This enables the automatic upgrade of the system database schema, as the setting dbms.allow_single_automatic_upgrade is true by default when dbms.mode=SINGLE.

  5. Copy the files used for encryption from the old installation to the new one.

  6. Restore each of your databases and transactions in the new installation, including the system database, by either using neo4j-admin restore (online) or neo4j-admin load (offline), depending on your backup approach.

    If your old installation has modified configurations starting with dbms.directories.* or the setting dbms.default_database, verify that the new neo4j.conf file is configured properly to find these directories.

  7. If using custom plugins, make sure they are updated and compatible with the new version, and place them in the /plugins directory.

3. Upgrade your instance

  1. Start the instance by running the following command from <neo4j-home>:

    bin/neo4j start

    The upgrade takes place during startup.

  2. Monitor the neo4j.log file for information on how many steps the upgrade involves and how far it has progressed.

4. Post-upgrade tasks

  1. When the upgrade finishes, open the neo4j.conf file and set dbms.allow_upgrade=false. If, for some reason, you have forgotten to enable the automatic upgrade of the system database schema, use the following commands to manually upgrade it:

    • CALL dbms.upgradeStatus() to determine whether an upgrade is necessary or not.

    • CALL dbms.upgrade() on the system database to perform the upgrade of the system schema. For more details, see Operations Manual v4.4 → Procedures.

  2. Restart the instance by running the following command from <neo4j-home>:

    bin/neo4j restart
  3. It is good practice to make a full backup immediately after the upgrade.

  4. Check the default settings on all metrics. Any specific metrics that you want to be enabled must be specified in the metrics.filter. For more information, see Operations Manual → Enable metrics logging.