Search code examples
herokubackupneo4jneography

Restoring (cloning) neo4j db from heroku to local machine


I am having trouble figuring out how to import (replicate) my neo4j graph from Heroku (http://www.heroku.com) to my local neo4j instance.

The steps I do now:

  1. Create a backup of my Heroku neo4j database via neo4j dashboard

  2. Download the backup zip file and unzip it

  3. Stop the local neo4j server via rake neo4j:stop ( I' am using rails and this wonderful gem https://github.com/maxdemarzi/neography)

  4. Delete everything in my neo4j/data folder and replace it with the content of the folder I extracted from the backup zip file

  5. Start the local neo4j server

Then if I visit localhost:7474 (my local neo4j web admin) and query for number of nodes, I get 1 node (root). So my database is still empty, I should have around 1000 nodes. What am I doing wrong ?

This is the list of files I get from Heroku that I copy to data folder. Shouldn't there also be a graph.db folder included in the backup ?

list of neo4j backup files

Is there any other way to import neo4j database from Heroku to local machine ? Version of my neo4j instance is 1.8.1, I believe the Heroku version is the same.


Solution

  • You're wrong in step 4. You need to clear data/graph.db and unzip the heroku backup there. Also make sure that you do not run a older version locally than on Heroku.