8.2. Upgrade a single instance

This section describes how to upgrade a single Neo4j instance.

For instructions on upgrading a Neo4j Causal Cluster, see Section 8.3, “Upgrade a Causal Cluster”.

Pre-upgrade steps
Shutdown and backup
  1. If the database is running, shut it down cleanly.
  2. Perform and verify backups:

Upgrade
  1. Install Neo4j 4.0.0 using one of the following methods, specific to your technology:

    1. If using a tarball or zipfile for installation:

      1. Untar or unzip Neo4j 4.0.0.
      2. Transfer the new neo4j.conf that you prepared in the Apply configuration changes step in Section 8.1, “Upgrade planning”.
      3. Set dbms.allow_upgrade=true in neo4j.conf of the 4.0.0 installation. Neo4j will fail to start without this configuration.
      4. Copy the files used for encryption from the old installation to the new one.
      5. Copy the data directory from the old installation to the new one. This step is not applicable if you have dbms.directories.data pointing to a directory outside of NEO4J_HOME.
      6. If using custom plugins, place the plugins that are adjusted for the new version in the /plugins directory.
    2. If using a Debian or RPM distribution:

      1. Set dbms.allow_upgrade=true in neo4j.conf.
      2. Install Neo4j 4.0.0.
      3. When prompted, review the differences between the neo4j.conf files of the previous version and Neo4j 4.0.0. Transfer any custom settings to the 4.0.0 installation, as noted under the Apply configuration changes step in 4.0 Migration Guide → Prepare to upgrade. Make sure to preserve dbms.allow_upgrade=true as set in the instruction above. Neo4j will fail to start without this configuration.
      4. If using custom plugins, place the plugins that are adjusted for the new version in the /plugins directory.
  2. Start up Neo4j 4.0.0. The database upgrade will take place during startup.

    The neo4j.log file contains valuable information on how many steps the upgrade will involve and how far it has progressed. For large upgrades, it is a good idea to monitor this log continuously.

Post-upgrade steps
  1. When the upgrade has finished, dbms.allow_upgrade should be set to false or be removed.
  2. Restart the database.
  3. It is good practice to make a full backup immediately after the upgrade.