neo4j 不同实例之间数据的export和import

consider to use APOC. Here is how to use.

[on export side]

  1. enable APOC(Neo4j Desktop is easy to enable)
  2. set "apoc.export.file.enabled=true" into your database config
  3. (re)start database
  4. open Neo4j browser
  5. call "CALL apoc.export.cypherAll('/usr/tmp/test1.cypher', {format:'plain'})"

merge exported files like this

cat test1.cypher test2.cypher > target.cypher

[on import side]

  1. enable APOC
  2. set "apoc.import.file.enabled=true" into your database config
  3. start database
  4. open terminal
  5. run command
cat /usr/tmp/target.cypher | bin/cypher-shell -u yourusername -p yourpassword

This procedure doesn't care about duplicated nodes and relationships. I hope this may helps.

 

Referneces:

original dock: https://community.neo4j.com/t/how-to-merge-two-databases/4835/2

export, import using apoc: https://neo4j-contrib.github.io/neo4j-apoc-procedures/#export-csv

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值