5.4. Upgrade a Neo4j HA cluster

This section describes how to upgrade a Neo4j HA cluster.

Upgrading a Neo4j HA cluster to Neo4j 3.3.5 requires following a specific process in order to ensure that the cluster remains consistent, and that all cluster instances are able to join and participate in the cluster following their upgrade.

Please note that Neo4j 3.3.5 does not support rolling upgrades.

5.4.1. Back up the Neo4j database

  • Before starting any upgrade procedure, it is very important to make a full backup of your database.
  • For detailed instructions on backing up your Neo4j database, refer to the backup chapter.

5.4.2. Shut down the cluster

  1. Shut down the slave instances, one by one.
  2. Shut down the master last.

5.4.3. Upgrade the master

  1. Install Neo4j 3.3.5 on the master, keeping the database directory untouched.
  2. Set dbms.mode=SINGLE in neo4j.conf to disable HA in the configuration.
  3. Follow the single instance upgrade instructions to upgrade Neo4j.
  4. When upgrade has completed, shut down Neo4j again.
  5. Set dbms.mode=HA in neo4j.conf to re-enable HA in the configuration.
  6. Make a full backup of the Neo4j database.

    Please note that backups taken before the upgrade are no longer valid for update via the incremental online backup. Therefore, it is important to perform a full backup, using an empty target directory, at this point.

5.4.4. Upgrade the slaves

On each slave:

  1. Remove the database directory.
  2. Install Neo4j 3.3.5.
  3. Review the settings in the configuration files in the previous installation, and transfer any custom settings to the 3.3.5 installation. Be aware of settings that have changed name between versions.
  4. If the database is not called graph.db, set dbms.active_database in neo4j.conf to the name of the database.
  5. If applicable, copy the security configuration from the master, since this is not propagated automatically.

At this point it is an alternative to manually copy database directory from the master to the slaves. Doing so will avoid the need to sync from the master when starting. This can save considerable time when upgrading large databases.

5.4.5. Restart the cluster

  1. Start the master instance.
  2. Start the slaves, one by one.

Once a slave has joined the cluster, it will sync the database from the master instance.