shafigh
shafigh

Reputation: 61

Exporting Neo4j database for importing in another Neo4j-desktop application

I should say, that neo4j-admin tools didnt work for me.

    neo4j-admin dump --database=<database-name>  --to=<database-address>

and i get an error every time, that database doesnt exist.

so is there any other way to export my Neo4j database ??

C:\Users\Shafigh\.Neo4jDesktop\neo4jDatabases\database-2912eb35-11ba-4ae1- 
b5b9-cb4b88a6f0a9\installation-3.4.7\bin> neo4j-admin dump --database=test_1  
--to=C:/Users/Shafigh/Desktop/files
org.neo4j.commandline.admin.CommandFailed: database does not exist: test_1
at org.neo4j.commandline.dbms.DumpCommand.execute(DumpCommand.java:83)
at org.neo4j.commandline.admin.AdminTool.execute(AdminTool.java:127)
at org.neo4j.commandline.admin.AdminTool.main(AdminTool.java:51)
Caused by: java.lang.IllegalArgumentException: Directory 
'C:\Users\Shafigh\.Neo4jDesktop\neo4jDatabases\database-2912eb35-11ba-4ae1- 
b5b9-cb4b88a6f0a9\installation-3.4.7\data\databases\test_1' does not contain 
a database
    at 
  org.neo4j.kernel.impl.util.Validators.lambda$static$3(Validators.java:111)
    at org.neo4j.commandline.dbms.DumpCommand.execute(DumpCommand.java:79)
    ... 2 more
command failed: database does not exist: test_1

snapshot of my Neo4j desktop

graph_db size

Upvotes: 0

Views: 1984

Answers (1)

cybersam
cybersam

Reputation: 67044

test_1 is just the name of your Neo4j Desktop "project". It is not the name of your "database".

Use this command line instead (which uses the default database name, which is what you are using):

neo4j-admin dump --database=graph.db --to=C:/Users/Shafigh/Desktop/files

[UPDATED with more details, from my comments]

Neo4j Desktop is an environment that allows you to have many projects, with each project having possibly multiple DBs and plugins with different versions. So, your "test_1" is just the name of your project. Within that project, each DB will have its own directory structure, and by default the directory in that structure that contains your DB is given the name "graph.db". You can change the name of that DB if you want by setting the dbms.active_database property in that DB's neo4j.conf file -- but that is rarely useful.

Upvotes: 1

Related Questions