Upgrading a Neo4j HA cluster to Neo4j 3.1.0-SNAPSHOT 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. Neo4j 3.1.0-SNAPSHOT does not support rolling upgrades.
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 guide.
Shut down the cluster
- Shut down the database slave instances one by one.
- Shut down the master last.
Upgrade the master
- Install Neo4j 3.1.0-SNAPSHOT on the master, keeping the database files untouched.
-
Disable HA in the configuration, by setting
dbms.mode=SINGLE
inneo4j.conf
. - Upgrade as described for a single instance of Neo4j
- When upgrade has finished, shut down Neo4j again.
-
Re-enable HA in the configuration by setting
dbms.mode=HA
inneo4j.conf
. - Make a full backup of the Neo4j database. Please note that backups from 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.
Upgrade the slaves
On each slave:
- Remove all database files.
- Install Neo4j 3.1.0-SNAPSHOT.
- Review the settings in the configuration files in the previous installation, and transfer any custom settings to the 3.1.0-SNAPSHOT installation. Be aware of settings that have changed name between versions.
-
If the database is not called
graph.db
, setdbms.active_database
inneo4j.conf
to the name of the database. - If applicable, copy security the security configuration from the master, since this is not propagated automatically. See the section called “Copying security configuration from one instance to another” for instructions.
Tip At this point it is an alternative is to manually copy database files 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. |
Restart the cluster
- Start the master instance.
- Start the slaves, one by one. Once a slave has joined the cluster, it will sync the database from the master instance.