In-place rolling upgrade (Package manager)

This example shows how to perform an in-place rolling upgrade of a v5.x cluster using a package manager.

It is recommended to read the following pages before continuing:

For critical systems, it is recommended to:

  • Backup your server(s), including databases, configuration, and encryption keys to avoid losing data in case of failure.

  • Perform the upgrade in a test environment.

Before upgrading your cluster, ensure that it is in a healthy state. For example, this query checking for servers that are not hosting the databases they are expected to host should return no results:

SHOW SERVERS YIELD name, hosting, requestedHosting, serverId WHERE requestedHosting <> hosting

And this one checking for databases that are not in their expected state should also return no results:

SHOW DATABASES YIELD name, address, currentStatus, requestedStatus, statusMessage WHERE currentStatus <> requestedStatus RETURN name, address, currentStatus, requestedStatus, statusMessage

The following example steps assume that the environment has three cluster servers and Neo4j DBMS is running as systemd service. They use the RPM package manager and Yum as a front end. However, the steps for another package and service manager will be very similar.

For more information on how to configure the Neo4j Yum repository, see Operations Manual → Deploy Neo4j using the Neo4j RPM package. For more information about the supported package and service managers, see Operations Manual → Linux installation.

The Neo4j bin directory must be on a user PATH (default for the RPM package).

Upgrade steps

On each server

  1. Update the Neo4j DBMS:

    sudo yum update neo4j

    The RPM package installs the binaries to /usr/share/neo4j, config to /etc/neo4j, and database stores to /var/lib/neo4j. This means that during a package update, only the binaries in /usr/share/neo4j are changed, and users do not need to copy config and database stores from the old installation to the new one.

  2. Run CALL dbms.upgrade() against the cluster using Cypher Shell or another Cypher client.

Monitor the logs

The neo4j.log file contains information on how many steps the upgrade will involve and how far it has progressed. You can monitor this log using journalctl -e -u neo4j.