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?

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to