10.2. Upgrade a single instance

This section describes how to upgrade a single Neo4j instance.

This section describes the following:

10.2.1. Prerequisites

10.2.2. Upgrade Neo4j using the tarball or ZIP file distribution

  1. Untar or unzip Neo4j 4.1.1.
  2. Place the new neo4j.conf that you have prepared during the upgrade planning in the Configuration directory.
  3. Open the neo4j.conf file of the new installation and configure the following settings:

  4. If using role-based access control, copy the data/dbms directory into the new location.
  5. Copy the files used for encryption from the old installation to the new one.
  6. Use the command neo4j-admin load --from=<archive-path> --database=<database> [--force] to load your data dump. For more information, see Section 15.7, “Dump and load databases”.
  7. If using custom plugins, place the plugins in the /plugins directory.
  8. Run ./bin/neo4j start to start Neo4j 4.1.1. The database upgrade takes place during startup.
  9. Monitor the neo4j.log file for information on how many steps the upgrade involves and how far it has progressed.

10.2.3. Upgrade Neo4j using the Debian or RPM distribution

  1. Open the neo4j.conf file of the new installation and configure the following settings:

  2. Install Neo4j 4.1.1. See Chapter 2, Installation.
  3. When prompted, review the differences between the neo4j.conf files of the previous version and Neo4j 4.1.1. Transfer any custom settings to the 4.1.1 installation that you have prepared during the upgrade planning. Make sure to preserve the settings as set in step 1.
  4. If using custom plugins, place the plugins in the /plugins directory.
  5. Run ./bin/neo4j start to start Neo4j 4.1.1. The database upgrade takes place during startup.
  6. Monitor the neo4j.log file for information on how many steps the upgrade involves and how far it has progressed.

10.2.4. Post-upgrade tasks

  1. After the upgrade finishes, open the neo4j.conf file, and set dbms.allow_upgrade to 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 Built-in procedures.

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