unix下离线备份neo4j社区版:mac或linux [英] Backup neo4j community edition offline in unix: mac or linux

查看:11
本文介绍了unix下离线备份neo4j社区版:mac或linux的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以前我在进行备份"时遇到问题,如下所示 问题 我在尝试恢复数据库时遇到错误,因为我在数据库运行时进行了复制.

Previously I had a problem when making a 'backup' as shown in this question where I get an error when trying to restore the database because I did a copy when the database was running.

所以我用另一台计算机上的新数据库(这次是用 ubuntu)做了一个实验,我尝试了这个:

So I did an experiment with a new database from another computer (this time with ubuntu) I tried this:

  • 我创建了一些节点和关系,很少有像 10(矩阵示例).
  • 然后我停止了 Neo4j 服务
  • 我将包含 graph.db 的文件夹数据复制到另一个位置
  • 之后我删除了graph.db文件夹并启动了neo4j
  • 它自动创建了一个新的 graph.db 文件夹,数据库以新的方式运行,没有任何数据,这是正常的.
  • 然后我再次停下来粘贴旧的graph.db文件夹

我收到一个错误:

 Starting Neo4j Server...WARNING: not changing user waiting 
 for server to be ready... Failed to start within 120 seconds.

错误出现在 5 秒后而不是 120 秒后.

The error appears after 5 seconds not after 120 seconds.

  • 我尝试粘贴名为 data 的文件夹.同样的错误.
  • I tried pasting the folder called data. Same error.

neo4j 社区如何离线手动备份和恢复?

我在一些帖子中读到您只复制和恢复但不起作用.

I read in some posts that you only copy and restore but that does not work.

感谢您的帮助

推荐答案

在线备份,在 Neo4j 运行时进行一致备份,仅在 Neo4j 企业版中可用.企业版的备份还具有详细的备份一致性检查功能,这在社区中也没有.

Online backup, in a sense of taking a consistent backup while Neo4j is running, is only available in Neo4j enterprise edition. Enterprise edition's backup also features a verbose consistency check of the backup, something you do not get in community either.

社区版中唯一安全的选择是干净地关闭 Neo4j 并递归复制 graph.db 文件夹.我通常使用:

The only safe option in community edition is to shutdown Neo4j cleanly and copy away the graph.db folder recursively. I'm typically using:

cd data
tar -zcf graph.db.tar.gz graph.db/

要恢复关闭neo4j,请清除现有的graph.db文件夹并从备份中恢复原始graph.db文件夹:

For restoring you shut down neo4j, clean out a existing graph.db folder and restore the original graph.db folder from your backup:

cd data
rm -rf graph.db
tar -zxf graph.db.tar.gz

这篇关于unix下离线备份neo4j社区版:mac或linux的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆