Article DetailsDetailsHelp DetailsNeo4j includes an effective tool for importing data into the Neo4j database. In version 4, it is called neo4j-admin import; in version 5, it is called neo4j-admin database import. Neo4j 4: https://neo4j.com/docs/operations-manual/4.4/tools/neo4j-admin/neo4j-admin-import/ Neo4j 5: https://neo4j.com/docs/operations-manual/5/tutorial/neo4j-admin-import/ There are two steps often missed after the completion of the import. This article aims to address them. Let's say you execute this import command in 4.4.x - bin/neo4j-admin import --database=foo --nodes=import/movies.csv --nodes=import/actors.csv --relationships=import/roles.csv After the completion of the import process, there will be two directories created: <neo4j_home>/data/databases/foo And <neo4j_home>/data/transactions/foo First thing to do: Check the directory ownership for the above two directories. They should be owned by the user under which the neo4j service runs. If that is not the case. Execute the following command (using the Linux example and assuming the default Linux user/group being neo4j): chown -R neo4j:neo4j <neo4j_home>/data/databases/foo And chown -R neo4j:neo4j <neo4j_home>/data/transactions/foo Second, things are different in a cluster: Before the database can be created, the newly created database directory, foo in the above example, must be present on all cluster members. There are two ways of doing this. Option 1. Create an offline backup (dump) of the newly created database (created as a result of executing the import command) and load it on all other cluster members bin/neo4j-admin dump --database=foo --to=/dumps/neo4j/foo.dump bin/neo4j-admin load --from=/dumps/neo4j/foo.dump --database=foo --force Next, create the database using cypher-shell or Neo4j Browser as: CREATE DATABASE foo; Option 2. Create the database using the seed from the server where the import command was executed. CREATE DATABASE foo OPTIONS {existingData: ‘use’, existingDataSeedInstance: ‘<serverID>’} This will copy the store files, for database foo in the above example, to all cluster members. Note: The above points are valid for version 5 as well. However, the commands (in options1 and 2) may differ slightly. Other Articles on the topic InformationTitleImportant steps after executing neo4j-admin importArticle Created Date3/15/2024, 10:54 PMURL Name22122195997075-Important-steps-after-executing-neo4j-admin-importLast Modified Date6/28/2024, 3:59 PM