Extracting DB structure from a existing DB to have the script to create new one(s)

HI,
we always had only to do backup of the existing DB. Thus, since we created it, we did minor changes to the structure and of course, no one documented them ...
I'm planning to recreate a new instance , so I would like to know if it is possible to get an export/extract of the DB structure ( like mysql for the ones who knows it )
I found many docs on backup/restore ( like this official one : https://neo4j.com/docs/operations-manual/current/tools/dump-load/) but I can't find the info.
note that we don't need to have the data .. we will probably restart from scratch
Thanks for your insights !

structure? as in you need to know the indexes and constraints configured?

if so https://neo4j.com/developer/kb/using-cypher-to-generate-cypher-statements-to-recreate-indexes-and-constraints/ might be of help

Hi Dana,
Thanks a lot
yes it is this :smiley:
I'm now investigating on why call db.schemaStatements(); is an unknown procedure on my install ( last explanation on the link )
With constraints, indexes and fields definitions, I should be good

call db.schemaStatements() is only valid in 4.0.x forward

yes, that's what I found.
Any idea on how I can perform the same ? ( my version is 3.5.6 ) ?

describes both the steps for a 3.x environment as well as a 4.x environment.

1 Like

Thanks a lot
all set !