Reputation: 8559
I have a huge dump of my graph in a file (i.e. 550k lines of CRATEs) and I need to restore it. I tried from terminal
neo4j-shell -file backup.cypher
...but after 24 hours the transaction was not committed, then I stopped it.
Is there another way to restore my data?
Upvotes: 1
Views: 278
Reputation: 41676
Split up the creates into individual ones, separated by semicolon.
then wrap 50k of them each into a begin ... commit
block.
for the relationships, change them to a match + match + create statement to find the two nodes and create the relationship.
Upvotes: 1
Reputation: 45043
You can split your dump file to multiple files and run restore for each of it.
But be aware there could be references between CREATE clauses.
Upvotes: 2