备份neo4j社区版在unix:mac或linux脱机 [英] Backup neo4j community edition offline in unix: mac or linux

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

问题描述

以前,我在进行备份时遇到了问题,如 question 在尝试还原数据库时出现错误,因为我在数据库运行时执行了副本。

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.

我试过这个:


  • 我创建了一些节点和关系,很少像10(矩阵示例)。

  • 然后我停止了服务neo4j

  • 我将包含graph.db的文件夹数据复制到另一个位置

  • 之后,我删除了graph.db文件夹并启动neo4j

  • 它自动创建一个新的graph.db文件夹,数据库运行为新的没有任何数据,这是正常的。

  • 然后我再次停止并粘贴旧 graph.db 文件夹

  • I created some nodes and relations, very few like 10 (the matrix example).
  • Then I stopped the service neo4j
  • I copied the folder data that contains graph.db to another location
  • After that I deleted the graph.db folder and started neo4j
  • It created automatically a new graph.db folder and the database runs as new without any data, that is normal.
  • Then I stopped again and paste the old graph.db folder

我收到错误:

 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.


  • 我尝试粘贴名为数据的文件夹。同样的错误。
  • 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文件夹并恢复原始图形。 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

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

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