neo4j迁移数据从4.4版本到5.17版本

news/2024/7/23 10:36:46 标签: neo4j

1、备份4.4版本的数据

名字要以.dump 结尾, 不然导入不到新的neo4j 数据库中

systemctl stop neo4j
neo4j-admin dump --database=neo4j --to=/tmp/neo4j.dump

neo4j_8">2.导入数据到5.17版本的neo4j

1> 把备份文件放到一个目录下,只有备份文件

/Users/bailongma/Documents/neo4j.dumpLoad/
/Users/bailongma/Documents/neo4j.dumpLoad/neo4j.dump

2> 恢复数据

brew services  stop neo4j
neo4j-admin database load --from-path=/Users/bailongma/Documents/neo4j.dumpLoad/  --overwrite-destination=true neo4j --verbose

最后输出的内容
The loaded database 'neo4j' is not on a supported version (current format: AF4.3.0 introduced in 4.3.0). Use the 'neo4j-admin database migrate' command

3> 安装执行 migrate 加上–force-btree-indexes-to-range

neo4j-admin database migrate neo4j --force-btree-indexes-to-range

不加速上–force-btree-indexes-to-range 会包如下错误

2024-03-11 02:52:03.317+0000 ERROR [o.n.c.d.MigrateStoreCommand] Failed to migrate database 'neo4j': Migration will remove all BTREE indexes and constraints backed by BTREE indexes. To guard against unintentionally removing indexes or constraints, it is recommended for all BTREE indexes or constraints backed by BTREE indexes to have a valid replacement. Indexes can be replaced by RANGE, TEXT or POINT index and constraints can be replaced by constraints backed by RANGE index. Please drop your indexes and constraints or create replacements and retry the migration. The indexes and constraints without replacement are: [Index( id=9, name='index_9e928bcf', type='BTREE', schema=(:Concept {id}), indexProvider='native-btree-1.0' ), Index( id=8, name='index_9cd40186', type='BTREE', schema=(:Order {orderID}), indexProvider='native-btree-1.0' ), Index( id=7, name='index_22b7066a', type='BTREE', schema=(:Customer {customerID}), indexProvider='native-btree-1.0' ), Index( id=4, name='index_60a51174', type='BTREE', schema=(:Product {productName}), indexProvider='native-btree-1.0' ), Index( id=17, name='index_e8659bba', type='BTREE', schema=(:File {fileName}), indexProvider='native-btree-1.0' ), Index( id=15, name='index_c45ecb68', type='BTREE', schema=(:ArtifactId {fqn}), indexProvider='native-btree-1.0' ), Index( id=16, name='index_2bae0813', type='BTREE', schema=(:Artifact {fqn}), indexProvider='native-btree-1.0' ), Index( id=6, name='index_de8a8b8f', type='BTREE', schema=(:Supplier {supplierID}), indexProvider='native-btree-1.0' ), Index( id=18, name='index_5c88aaa9', type='BTREE', schema=(:Version {fqn}), indexProvider='native-btree-1.0' ), Index( id=5, name='index_44f4e370', type='BTREE', schema=(:Category {categoryID}), indexProvider='native-btree-1.0' ), Index( id=11, name='index_60d85244', type='BTREE', schema=(:GroupId {name}), indexProvider='native-btree-1.0' ), Index( id=10, name='index_1cc3c547', type='BTREE', schema=(:Type {fqn}), indexProvider='native-btree-1.0' ), Index( id=12, name='index_2021f2af', type='BTREE', schema=(:Package {fqn}), indexProvider='native-btree-1.0' ), Index( id=3, name='index_eadfd5a0', type='BTREE', schema=(:Product {productID}), indexProvider='native-btree-1.0' ), Index( id=14, name='index_cadc6548', type='BTREE', schema=(:Repository {url}), indexProvider='native-btree-1.0' ), Index( id=13, name='index_65a8ebac', type='BTREE', schema=(:Project {fqn}), indexProvider='native-btree-1.0' )] and []. Alternatively, you can use the option --force-btree-indexes-to-range to force all BTREE indexes or constraints backed by BTREE indexes to be replaced by RANGE equivalents. Be aware that RANGE indexes are not always the optimal replacement of BTREEs and performance may be affected while the new indexes are populated. See the Neo4j v5 migration guide online for more information.
2024-03-11 02:52:03.318+0000 ERROR [o.n.c.d.MigrateStoreCommand] Migration failed for databases: 'neo4j'
Migration failed for databases: 'neo4j'
Run with '--verbose' for a more detailed error message.

4> 启动数据库

brew services  start  neo4j

完成数据迁移


http://www.niftyadmin.cn/n/5422969.html

相关文章

C#求最大公约数: 欧几里得算法 vs 辗转相除法

目录 1.最大公约数 2.欧几里得算法 3.辗转相除法 1.最大公约数 最大公约数(Greatest Common Divisor,GCD)是两个或多个整数共有的最大的能被无余地整除的数。例如,12 和 18 的最大公约数是 6。最大公约数可以通过辗转相除法、欧…

Matlab中安装mltbx工具箱文件

准备 前提就是要已经下载好了相应的mltbx格式的工具箱文件 一般来说可以直接在开源的Github上下到相应的文件,这里以VeriStand Model Generation Support MATLAB add-on为例 注: 一般来说你可以下载到的文件有两种: Source Code &#xff…

【计算机视觉】图像处理算法(形态学滤波篇)

来源:《OpenCV3编程入门》,怀念毛星云大佬🕯️ 说明:本系列重点关注各种图像处理算法的原理、作用和对比 形态学滤波(1 ):腐蚀与膨胀 形态学槪述 数学形态学的概念: 数学形态学(Mathematical morphology)是立在格论…

Linux平台下智能入侵检测系统设计与实现

目 录 摘 要 I Abstract II 引 言 1 1 入侵检测与Snort概述 3 1.1入侵检测系统概念 3 1.2 Snort系统 3 1.3 Snort的特点 3 1.4 Snort规则 4 1.4.1 规则的结构 4 1.4.2 规则头部 5 1.4.3 规则选项 6 1.5 本章小结 6 2 需求分析与总体设计 7 2.1 必要功能需求分析 7 2.2 数据库的…

代码随想录算法训练营第五十八天| 739. 每日温度、496.下一个更大元素 I

代码随想录算法训练营第五十八天| 739. 每日温度、496.下一个更大元素 I 739. 每日温度496.下一个更大元素 I 739. 每日温度 题目链接 文章讲解 class Solution { public:vector<int> dailyTemperatures(vector<int>& temperatures) {int n temperatures.size…

【使用postman测试python接口】

打开python服务 设置postman如下&#xff0c;并发送&#xff1a; postman新建请求设置请求方式为post设置地址、raw、json方式、内容如下 结果&#xff1a; python如下&#xff1a; from flask import Flask, request, jsonifyapp Flask(__name__) # 实例化对象app.route…

qt 汉字输出 中文输出 显示乱码 qDebug() 乱码 解决

要正确显示汉字&#xff0c;必须要先了解计算机文字编码相关知识&#xff0c;参考&#xff1a;unicode ucs2 utf16 utf8 ansi GBK GB2312 互转 及 渲染_ucs2编码转换-CSDN博客 1、汉字输出到 应用程序输出面板 qt 自定义的输出类qDebug() 、QDebug对象、QMessageLogger默认输…

C++读取文件数据

文件读取和输出 #include<iostream> using namespace std;void read(){// 文件读入 freopen("a.in.txt", "r", stdin);// 文件输出freopen("a.out.txt", "w", stdout);int a, b;while(cin>>a>>b){cout<<a b…