neo4j: How do I change the database storage location?

You need to set the location on disk of the database directory like this:

org.neo4j.server.database.location=data/graph.db

See http://docs.neo4j.org/chunked/stable/server-configuration.html


You first need confirm that the database you are connecting to was properly shut down (means you should not take the image of a running database).

Set the location of the database if you are in server mode from the file

conf/neo4j-server.properties

by editing the below line.

org.neo4j.server.database.location=data/graph.db

if you are using embedded neo4j you can set the location of your db while instantaniating the GraphDatabaseService as under:

new EmbeddedGraphDatabase("Path To Db Directory");

Tags:

Neo4J