The general steps of migrating Neo4j 4.4.x Community Edition to Neo4j 5.x Enterprise EditionJun 5, 2024Knowledge
Article DetailsDetailsHelp DetailsThis article aims at the process of migrating a Neo4j 4.4.x Community Edition database to Neo4j 5.x Enterprise Edition cluster. For the pre-setup, you should have already prepared indexes before doing the Neo4j 4.4.x community dump. Please refer to the indexes preparation. 1. On one of the Neo4j 5 cluster members, you will run the database load command like below using your 4.4.x dump. (Make sure the JVM 17 is ready before running the Neo4j 5 "neo4j-admin" command). bin/neo4j-admin database load dumped_database --from-path=/path_to_dumps You will see the similar message like below in this step: The loaded database 'test11' is not on a supported version (current format: AF4.3.0 introduced in 4.3.0). Use the 'neo4j-admin database migrate' command 2. Migrate the database (ensure you use the Neo4j 5 "neo4j-admin") bin/neo4j-admin database migrate loaded_database 3. From one of the Neo4j 5 cluster members, you need to recreate the database for the "loaded_database". The example below creates the database with 3 primaries and 1 secondary, CREATE DATABASE <loaded_database> TOPOLOGY 3 PRIMARIES 1 SECONDARIES OPTIONS {existingData: 'use', existingDataSeedInstance: 'ServerId for a' Note: the 'ServerId for a' is the server id where you just loaded the database. You may get the ServerId by executing the command below cypher-shell or Neo4j browser. SHOW SERVERS YIELD serverId, name, address, state, health, hosting; In addition, the name of the dump file xxxx.dump has to be equal to the database name which you are trying to load. Before you load it, you can rename the dump file, then load the renamed dump file. Here is an example. You can rename the test1.dump to test11.dump by neo4j user first, then load it. harry@lab2:~/4.4_dump$mv test1.dump test11.dump harry@lab2:~/neo4j-enterprise-5.8.0$ bin/neo4j-admin database load test11 --from-path=/home/harry/4.4_dump Done: 80 files, 251.2MiB processed. The loaded database 'test11' is not on a supported version (current format: AF4.3.0 introduced in 4.3.0). Use the 'neo4j-admin database migrate' command harry@lab2:~/neo4j-enterprise-5.8.0$ cd bin harry@lab2:~/neo4j-enterprise-5.8.0/bin$ ./neo4j-admin database migrate test11 2023-11-16 01:43:01.141+0000 INFO [c.n.c.d.EnterpriseMigrateStoreCommand] Starting migration for database 'test11' 2023-11-16 01:43:01.824+0000 INFO [o.n.k.i.s.StoreMigrator] 'AF4.3.0' has been identified as the current version of the store 2023-11-16 01:43:01.825+0000 INFO [o.n.k.i.s.StoreMigrator] 'record-aligned-1.1' has been identified as the target version of the store migration 2023-11-16 01:43:01.832+0000 INFO [o.n.k.i.s.StoreMigrator] Starting migration of database 2023-11-16 01:43:01.946+0000 INFO [o.n.k.i.s.StoreMigrator] Migrating Store files (1/7): ......7 step details omitted 2023-11-16 01:43:02.173+0000 INFO [o.n.k.i.s.StoreMigrator] Starting transaction logs migration. 2023-11-16 01:43:02.208+0000 INFO [o.n.k.i.s.StoreMigrator] Transaction logs migration completed. 2023-11-16 01:43:02.223+0000 INFO [o.n.k.i.s.StoreMigrator] Successfully finished migration of database, took 390ms 2023-11-16 01:43:02.226+0000 INFO [c.n.c.d.EnterpriseMigrateStoreCommand] Database migration completed successfully After loading the renamed the database dump, you can then create the database with the new name. References: https://neo4j.com/docs/upgrade-migration-guide/current/version-5/migration/planning/#_prepare_indexes https://neo4j.com/docs/upgrade-migration-guide/current/version-5/migration/migrate-databases/InformationTitleThe general steps of migrating Neo4j 4.4.x Community Edition to Neo4j 5.x Enterprise EditionArticle Created Date3/15/2024, 10:54 PMURL Name23695724410259-The-general-steps-of-migrating-Neo4j-4-4-x-Community-Edition-to-Neo4j-5-x-Enterprise-EditionLast Modified Date6/5/2024, 9:42 PM