How to transfer / transfer / copy / move data in Neo4j

Does anyone know how to transfer data from one instance of Neo4j to another. To be more precise, I want to know how to move data from one instance of Neo4j on my local computer to another on the remote computer. Does anyone know about this.

I am working on my Windows machine with Eclipse and Embedded Neo4j. I need to transfer this data to a remote instance of Neo4j on a Centos machine. Please help me with this.

+8
eclipse windows neo4j migration centos
source share
3 answers

For native mode, you just need to find the location of the neo4j-db chart folder, then pin the zip and send it to the remote system.

In your code, where you would call graphdatabaseservice, you would give the target location

Check if its relative database path can be in the project folder.

Now, to launch the db instance in the browser, you will need to use the neo4j switching server and point it to the folder containing the index folder. Therefore, if your neo4j-db is located in $ project / tmp / neo4j-db, you will transfer the file path to this folder (the folder with the index will be inside this folder)

Edit

The folder containing the schema and index folders must be archived. You can download and unzip a folder in a specific location using Putty on your stand-alone server. Then just change the org.neo4j.server.database.location file to conf/neo4j-server.properties .

+1
source share

Not sure how to do this for the "built-in neo4j db". But for standalone and in case you have something like the "Putty" command line tool on your Windows machine, this should work. Instead of $ NEO4j_HOME, you can also use the usual path without the env variable.

 $NEO4J_HOME/bin/neo4j stop cd $NEO4J_HOME/data tar -cvf graph.db.tar graph.db gzip graph.db.tar scp -i ~/some_path/key_for_remote_server.pem ./graph.db.tar.gz username@your_remote_domeain.com:~/ ssh -i ~/some_path/key_for_remote_server.pem/ username@your_remote_domeain.com 

On a remote server (at least this works for ubuntu): Perhaps you need to use "sudo" (command prefix with sudo).

 mv ./graph.db.tar.gz /some_path/ cd /some_path/ gunzip graph.db.tar.gz tar -xvf graph.db.tar $NEO4J_HOME/bin/neo4j start $NEO4J_HOME/bin/neo4j status 
+6
source share

I found the following workaround for copying data from a server in a cluster to everyone else after using the neo4j import tool:

  • Stop all nodes.

  • On the new node / server, where you need your data to copy, you need to create a database folder for this graph (in my case loadTest): /neo4j-enterprise-3.1.0/data/databases/loadTest.db

  • Then, the source node / server on which the data is stored, you must copy the neostore.id file here to the db folder of the target server (loadTest.db from the previous step).

  • Run all the nodes. In the background, neo4j will copy data from other servers in the cluster to a new node.

+1
source share

All Articles