neo4j对于数据库的读取导入和导出Dump and load databases

本文介绍如何使用Neo4j管理员工具进行数据库dump和load操作,实现graph.db数据库的备份与恢复。通过具体命令展示如何将数据库导出为dump文件,并在需要时将备份文件重新加载到数据库中,覆盖现有数据。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://neo4j.com/docs/operations-manual/current/tools/dump-load/

 

Dump and load databases

neo4j-admin dump --database=<database> --to=<destination-path>

neo4j-admin load --from=<archive-path> --database=<database> [--force]

 

Dump the database called graph.db into a file called /backups/graph.db/2016-10-02.dump. The destination directory for the dump file — in this case /backups/graph.db — must exist before calling the command.

$neo4j-home> bin/neo4j-admin dump --database=graph.db --to=/backups/graph.db/2016-10-02.dump

$neo4j-home> ls /backups/graph.db

$neo4j-home> 2016-10-02.dump

Load the backed-up database contained in the file /backups/graph.db/2016-10-02.dump into database graph.db. Since we have a database running, we first have to shut it down. When we use the --force option, any existing database gets overwritten.

$neo4j-home> bin/neo4j stop

Stopping Neo4j.. stopped

$neo4j-home> bin/neo4j-admin load --from=/backups/graph.db/2016-10-02.dump --database=graph.db --force
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值