Neo4j 5 upgrade and migration

It is recommended to read the Introduction section before continuing.

Upgrading Neo4j 5

You can upgrade from any version of Neo4j 5 to any subsequent MINOR or PATCH version, by following the instructions in Upgrade or patch Neo4j 5.

Migrating databases from Neo4j 4.4

We do not recommend you upgrade a Neo4j 4.4 server to 5. Instead, you should configure a new Neo4j server and migrate the databases from the old server to the new server.

If you are using Neo4j 4.4, you can migrate your databases to Neo4j 5 by following the instructions in Migrate from 4.4.

Otherwise, you must first migrate your databases to Neo4j 4.4 by following the instructions in the Neo4j 4 specific section.

Migrating databases from Neo4j Community Edition to Neo4j Enterprise Edition

You can upgrade from Neo4j 5 Community Edition to Neo4j 5 Enterprise Edition using the following steps. If the information stored in the system database is not required when migrating, you can skip the steps associated with the system database.

  1. Stop the running Neo4j 5 Community Edition server:

    neo4j stop
  2. Backup the system and neo4j databases using the neo4j-admin database dump command:

    neo4j-admin database dump neo4j
    neo4j-admin database dump system

    By default, dumps are located to data/dumps/. Alternatively, the location can be defined via the conf/neo4j.conf setting server.directories.dumps.root.

  3. Load the system and neo4j databases into the Neo4j 5 Enterprise Edition server using neo4j-admin database load:

    neo4j-admin database load neo4j --from-path=<path-to-community-neo4j-dump>
    neo4j-admin database load system --from-path=<path-to-community-system-dump>
  4. Navigate to the Neo4j 5 Enterprise Edition server and start it:

    neo4j start
  5. If you are using 5.8 or before of Enterprise Edition, you need to manually upgrade the system database. Connect to the server and run the following procedure:

    CALL dbms.upgrade();

    5.9 onwards automatically does the upgrade when it is safe to do so.

  6. Drop the existing neo4j database that was created by default on startup. Note, this does not remove any store files loaded via neo4j-admin database load.

    DROP DATABASE neo4j;
  7. Create the neo4j database using the store files loaded via neo4j-admin database load:

    CREATE DATABASE neo4j;