Neo4j DB upgrade from 3.5.26 to 4.4.4
Prerequisites
Install OpenJDK 11 or Oracle Java 11.
Migration Steps:
Shutdown Neo4j if it is running.
Back up neo4j.conf and “data/databases” folder either using the online backup tool or offline backups and store in safe location.
Download operating system specific Neo4j 4.4.4 installation zip or tar from below links:
To get the Neo4j custom setting steps refer Neo4j Installation .
Untar or unzip Neo4j 4.4.4 folder and Neo4j setting zip.
Copy the data directory from old installation to new one.
(NOTE: The migration of users and roles from 3.5.26 to 4.4.4 is done automatically. Therefore, you do not have to move the “data/dbms/” directory and contents to the new installation.)
Change database name “graph.db” to default “neo4j” or any valid database name. (For database naming rules refer - https://neo4j.com/docs/operations-manual/current/manage-databases/configuration/#:~:text=Naming%20rules%20for%20databases%20are%20as%20follows%3A )
In neo4j.conf, set dbms.allow_upgrade=true to allow automatic store upgrade and uncomment dbms.default_database=neo4j (update database name here if it’s not “neo4j”)
Start Neo4j 4.4.4. The database migration will take place during start-up.
Post migration steps:
When the upgrade has finished, dbms.allow_upgrade should be set to false or be removed.
Restart the database.
Update Neo4j version and database name in server-config.json inside "graph" section.
If you have changed Neo4j credentials then update "authToken" as well in server-config.json.
Command to backup Neo4j database in offline mode:
bin\neo4j-admin dump --database=neo4j --to=backups\neo4j-<timestamp>.dump
Command to load backed up Neo4j database:
bin\neo4j-admin load --from=backups/neo4j-<timestamp>.dump --database=neo4j --force
©2021 Cognizant, all rights reserved. US Patent 10,410,152