Allen Lu
Allen Lu

Reputation: 105

How to save Graphs in Neo4j?

I'm very new Neo4j and I was wondering how to save a graph and upload it again. When I try to save my graph in either a CSV or JSON file it seems to only save the nodes and none of the relationships. I want to be able to completely save a graph and import the identical graph back with all the nodes and relationships intact.

Upvotes: 3

Views: 5198

Answers (2)

manonthemat
manonthemat

Reputation: 6251

The graph itself is stored in the graph.db directory, which you can find in your neo4j data (2.x) or data/databases (3.x) sub-directories.

You can simply back-up that folder and later move/copy that back-up in the appropriate place, before starting up the neo4j server to get your graph back.

Upvotes: 2

InverseFalcon
InverseFalcon

Reputation: 30397

I'm not quite sure what you mean by upload it again, but it sounds like you're referring to a backup of the database, and restoring from backup later.

This answer might be what you're looking for.

Otherwise, you might look at the import/export options offered by the APOC procedures plugin.

Upvotes: 0

Related Questions