liutec/neo4jtransfer

Neo4j Transfer

Installs: 84

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:application

0.0.7 2016-06-29 01:36 UTC

This package is not auto-updated.

Last update: 2024-10-26 19:37:57 UTC


README

Directly transfer nodes and relations between Neo4j servers or backup/restore entire databases to/from files.

Building

This tool may be built as a stand-alone phar file by using the following commands:

git clone https://github.com/liutec/neo4jtransfer.git
cd neo4jtransfer
composer install
./bin/build
./neo4jtransfer.phar help

Commands and arguments

The following commands are available:

The dump command

Dump all nodes and relations from a Neo4j database into a cypher file.

Dump command example

The following command will dump all nodes and relations from neo4j1-prod into a file. (eg. dump-neo4j1-prod-20160615-233212.cypher)

./neo4jtransfer.phar dump --output=default --source-host=neo4j1-prod

Dump command arguments

The import command

Run cypher queries from a file.

Import command example

The following command will look for the latest dump corresponding to the neo4j1-prod host (eg. dump-neo4j1-prod-20160615-233212.cypher) and execute the cypher queries within onto the Neo4j database on localhost.

./neo4jtransfer.phar import --input=last:neo4j1-prod

Import command arguments

The direct transfer command

Transfer nodes and relations from one Neo4j database into another without an intermediary dump file.

Direct transfer command example

The following command will transfer all nodes and relations from neo4j1-prod into app1-dev within a single transaction.

./neo4jtransfer.phar direct --source-host=neo4j1-prod --target-host=app1-dev --transactional

Direct transfer command arguments

The transfer command

Transfer nodes and relations from one Neo4j database into another and save all cypher queries to a dump file.

Transfer command example

The following command will transfer all nodes and relations from neo4j1-prod into app1-dev within a single transaction and create a dump file for backup. (eg. dump-neo4j1-prod-20160615-233212.cypher)

./neo4jtransfer.phar transfer --output=default --source-host=neo4j1-prod --target-host=app1-dev

Transfer command arguments