是否有工具可以将Neo4j图形转储为Cypher并从Cypher重新加载? [英] Is there a tool to dump a Neo4j graph as Cypher and re-load it from Cypher?

查看:85
本文介绍了是否有工具可以将Neo4j图形转储为Cypher并从Cypher重新加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每个熟悉MySQL的人都可能使用mysqldump命令,该命令可以生成代表MySQL数据库中的模式和数据的SQL语句文件. 这些SQL文本文件通常用于许多目的:备份,种子副本,在安装之间复制数据库(将产品DB复制到暂存环境等).

Everyone familiar with MySQL has likely used the mysqldump command which can generate a file of SQL statements representing both the schema and data in a MySQL database. These SQL text files are commonly used for many purposes: backups, seeding replicas, copying databases between installations (- copy prod DBs to staging environments etc) and others.

Neo4j是否有类似的工具可以将整个图形转储到Cypher语句的文本文件中,从而在空数据库上执行时可以重建原始数据?

Is there a similar tool for Neo4j that can dump an entire graph into a text file of Cypher statements, that when executed on an empty database would reconstruct the original data?

谢谢.

推荐答案

在neo4j版本2(例如2.0.0M3)中,使用neo4j-shell,您可以使用命令

In neo4j version 2 (e.g. 2.0.0M3), using neo4j-shell, you can use the command

dump

这将创建cypher语句(与mysqldump几乎一样.要读取文件,可以使用

which will create the cypher statements (pretty much like mysqldump would do. To read in the file you can use

cat dump.cql | neo4j-shell

这篇关于是否有工具可以将Neo4j图形转储为Cypher并从Cypher重新加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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