Supported upgrade and migration paths in 4.x

This section explains the supported upgrade and migration paths.

Which path you choose depends on your current version and the version you want to go to; if you are going to upgrade or migrate the whole Neo4j DBMS or a single database; and your backup and restore strategy.

  • Sequential path (Neo4j DBMS) from 3.5.latest → 4.0.latest → 4.1.latest → 4.2.latest → 4.3.latest → 4.4.latest
    It includes migration and follow-up upgrades of the whole Neo4j DBMS (both the databases and system database).

  • Copy/Migrate a single database from Neo4j Community or Enterprise Edition 3.5.latest or 4.x to Neo4j Enterprise Edition 4.4.latest
    It makes use of the neo4j-admin copy command to migrate the data store of the single database.

    The neo4j-admin copy command is a Neo4j Enterprise Edition feature. You can use it to migrate from Neo4j Community Edition to Neo4j Enterprise Edition.

  • Restore a single database into a running Neo4j DBMS on a later version.

Sequential path (Neo4j DBMS)

Following the sequential path, you first migrate your Neo4j deployment from 3.5.latest to 4.0.latest and then sequentially upgrade it to 4.1.latest, 4.2.latest, 4.3.latest, and 4.4.latest. It makes use of neo4-admin load or neo4j-admin restore to copy both the databases and the system database or backups to the new installation, and then it upgrades the data and schema stores to the new version during the Neo4j startup. The neo4j-admin commands can be run from an online, as well as from an offline Neo4j DBMS, and must be invoked as the neo4j user to ensure the appropriate file permissions.

Table 1. Documentation for completing your upgrade/migration
Starting version Target version Supported path Operations Documentation

3.4.latest

3.5.latest

3.4.latest → 3.5.latest

Upgrade

3.5.latest

4.0.latest

3.5.latest → 4.0.latest

Migration

3.5.latest

4.1.latest

3.5.latest → 4.0.latest → 4.1.latest

Migration and upgrade

3.5.latest

4.2.latest

3.5.latest → 4.0.latest → 4.1.latest → 4.2.latest

Migration and upgrades

3.5.latest

4.3.latest

3.5.latest → 4.0.latest → 4.1.latest → 4.2.latest → 4.3.latest

Migration and upgrades

3.5.latest

4.4.latest

3.5.latest → 4.0.latest → 4.1.latest → 4.2.latest → 4.3.latest → 4.4.latest

Migration and upgrades

4.0.latest

4.1.latest

4.0.latest → 4.1.latest

Upgrade

4.0.latest

4.2.latest

4.0.latest → 4.1.latest → 4.2.latest

Upgrades

4.0.latest

4.3.latest

4.0.latest → 4.1.latest → 4.2.latest → 4.3.latest

Upgrades

4.0.latest

4.4.latest

4.0.latest → 4.1.latest → 4.2.latest → 4.3.latest → 4.4.latest

Upgrades

4.1.latest

4.2.latest

4.1.latest → 4.2.latest

Upgrade

4.1.latest

4.3.latest

4.1.latest → 4.2.latest → 4.3.latest

Upgrade

4.1.latest

4.4.latest

4.1.latest → 4.2.latest → 4.3.latest → 4.4.latest

Upgrade

4.2.latest

4.3.latest

4.2.latest → 4.3.latest

Upgrade

4.2.latest

4.4.latest

4.2.latest → 4.3.latest → 4.4.latest

Upgrade

4.3.latest

4.4.latest

4.3.latest → 4.4.latest

Upgrade

Copy/Migrate a single database

You can use the neo4j-admin copy command to copy or migrate a single database, except for your system database, into a running Neo4j DBMS on any later version. The copy command copies and, if needed, migrates the data store of a database. However, it does not copy the schema store. Therefore, if a schema is defined, you must manually run the commands that the neo4j-admin copy operation outputs to recreate the schema.

This path is suitable for:

  • Cleaning up database inconsistencies and compacting stores.

  • Migrating a single database from a 3.5 Neo4j DBMS (Community or Enterprise) to 4.x Enterprise.

  • Migrating the store format of a single database. For more information on the store formats versions and compatibility, see Operations Manual → Store formats and entity limits.

  • Migrating a single database from a 4.x Community Edition to 4.y Enterprise Edition.

  • Migrating a single database from a 4.x Enterprise Edition to a later 4.y Enterprise Edition.

  • Migrating a single database from a 4.x Enterprise Edition to a later 4.y Enterprise Edition with a different store format.

The neo4j-admin copy command copies the entire data store and is an IOPS-intensive process. It takes up more room and is slower than a migration on startup. However, if you want to move over several of the sequential steps at once or for some reason want to move a few databases at a time, this might be a good option.

Keep in mind that the neo4j-admin copy command copies the node IDs, but the relationships get new IDs. Therefore, if you want to preserve the relationship IDs, you should follow the sequential path.

Restore a single database

You can use the neo4j-admin restore command to restore a backup of a single database into a running Neo4j DBMS on a later version. However, it does not migrate the store_format of the database. Therefore, if the restored database is not on the same store format as the DBMS, you will have to set dbms.allow_upgrade=true to enable the migration. For versions earlier than 4.1, you have to restart the DBMS for the configuration to take effect.