Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-28-2019 05:08 AM
Hi,
Not sure it is the right forum as I saw more import/export data from the DB but did not find one appropriate I think.
Feel free to let me know and I will move the post to the appropriate forum.
I have currently a schema created in my neo4J DB and I would like to have the cypher script created automatically ( backup, create another instance for other tests...etc..)
How can I perform this ?
To anticipate the question, of course we had the different cypher queries we used but as we worked at 3 together making different changes, it's a mess... now it is finalized and would be keen to have something clean !
Thanks
Solved! Go to Solution.
08-28-2019 11:46 AM
You can use apoc.export.cypher and friends for that use-case
see: https://neo4j-contrib.github.io/neo4j-apoc-procedures/#export-cypher
and then import that script e.g. with cypher-shell
08-28-2019 06:50 AM
Let me clarify - you want to create a backup of your database, and be able to restore that to a new / different database, so that you can have multiple environments for testing?
If I have understood that right, you can do that like this. You don't need cypher at all.
https://neo4j.com/docs/operations-manual/current/backup/performing/
08-28-2019 07:17 AM
Hi David.
Not really, it was the exemple
I would like to get the cypher script which will recreate the nodes and relationships that are currently existing in my DB. am I more clear ?
08-28-2019 11:46 AM
You can use apoc.export.cypher and friends for that use-case
see: https://neo4j-contrib.github.io/neo4j-apoc-procedures/#export-cypher
and then import that script e.g. with cypher-shell
08-29-2019 12:57 AM
Thanks Michael, I sued your solution which worked like a charm and fit 100% of my needs !
@ll , note that you need to install APOC if you are not using the desktop version
Thanks Michael
All the sessions of the conference are now available online