unable to import/export neo4j data between different neo4j instances.

37 views
Skip to first unread message

Bhupesh Goel

unread,
Sep 14, 2015, 4:16:16 AM9/14/15
to Neo4j
Hi,

I am trying to export and then import neo4j graph data from one db instance to another db instance. 

For exporting data from one DB instance i am executing command "./bin/neo4j-shell -c dump > data.txt" and for importing the exported data in file.txt to another db instance i am executing command "./bin/neo4j-shell -file data.txt" command.

For simplicity the content of data.txt dump file is of the form 

begin

 create (_0 {`name`:"Neo"});

 create (_1 {`app`:"foobar"});

 create (_2 {`app`:"foobar2"});

commit

begin

 create _1-[:`LIKES`]->_0;

 create _2-[:`LIKES`]->_0;

commit


Please note that i manually add semicolons after every statement in above dump.

After i import this form of graph data in data.txt to another fresh instance of neo4j db than what happens is it will create three nodes corresponding to first three lines and then further creates three more empty nodes corresponding to the third and fourth edge. It also creates edge between three empty nodes only. So, the dump of imported data in new db instance will look like 

begin

create (_0 {`name`:"Neo"})

create (_1 {`app`:"foobar"})

create (_2 {`app`:"foobar2"})

create (_3)

create (_4)

create (_5)

create (_6)

create _3-[:`LIKES`]->_4

create _5-[:`LIKES`]->_6

;

commit


Please do let me know what is wrong here and what is best way of importing data from one db to another neo4j db instance?

Michael Hunger

unread,
Oct 4, 2015, 7:58:51 AM10/4/15
to ne...@googlegroups.com
I added a new export tool to my neo4j-shell-tools, and would love if you could try it out:


Michael

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages