【Azure Redis 缓存】Azure Cache for Redis 服务的导出RDB文件无法在自建的Redis服务中导入

问题描述

使用微软云的Redis服务,导出它的RDB文件后,想把数据恢复到本地自建的Redis服务中,发现出现如下错误:

复制代码
15000:S 21 Jun 08:14:11.199 * Retrying with SYNC...
15000:S 21 Jun 08:14:11.201 # MASTER aborted replication with an error: ERR Command disallowed
15000:S 21 Jun 08:14:12.190 * Connecting to MASTER 40.139.62.182:6379
15000:S 21 Jun 08:14:12.190 * MASTER <-> SLAVE sync started
15000:S 21 Jun 08:14:12.193 * Non blocking connect for SYNC fired the event.
15000:S 21 Jun 08:14:12.196 * Master replied to PING, replication can continue...
15000:S 21 Jun 08:14:12.199 * (Non critical) Master does not understand REPLCONF listening-port: -ERR Command disallowed
15000:S 21 Jun 08:14:12.201 * (Non critical) Master does not understand REPLCONF capa: -ERR Command disallowed
15000:S 21 Jun 08:14:12.201 * Partial resynchronization not possible (no cached master)
15000:S 21 Jun 08:14:12.203 * Master does not support PSYNC or is in error state (reply: -ERR Command disallowed)
15000:S 21 Jun 08:14:12.203 * Retrying with SYNC...
15000:S 21 Jun 08:14:12.205 # MASTER aborted replication with an error: ERR Command disallowed
15000:S 21 Jun 08:14:13.193 - 0 clients connected (0 slaves), 721768 bytes in use
15000:S 21 Jun 08:14:13.193 * Connecting to MASTER 40.139.62.182:6379
15000:S 21 Jun 08:14:13.193 * MASTER <-> SLAVE sync started
15000:S 21 Jun 08:14:13.196 * Non blocking connect for SYNC fired the event.
15000:S 21 Jun 08:14:13.199 * Master replied to PING, replication can continue...
15000:S 21 Jun 08:14:13.203 * (Non critical) Master does not understand REPLCONF listening-port: -ERR Command disallowed
15000:S 21 Jun 08:14:13.204 * (Non critical) Master does not understand REPLCONF capa: -ERR Command disallowed
15000:S 21 Jun 08:14:13.204 * Partial resynchronization not possible (no cached master)
15000:S 21 Jun 08:14:13.206 * Master does not support PSYNC or is in error state (reply: -ERR Command disallowed)
15000:S 21 Jun 08:14:13.206 * Retrying with SYNC...
15000:S 21 Jun 08:14:13.208 # MASTER aborted replication with an error: ERR Command disallowed
 
复制代码

 

问题解答 

自建或从其他未经过特殊处理的Redis RDB文件,可以导入到Azure Redis服务中。但Azure Redis 导出的RDB文件会经过一些特殊处理,如适配Windows版Redis,导致它并不能直接导入本地的Redis中。所以遇见了以上错误。

如要进行转移数据,可以通过程序从Azure中读取所有的Redis Key 然后写入到本地自建的Redis服务中。

 

参考资料

以编程方式迁移:https://docs.azure.cn/zh-cn/azure-cache-for-redis/cache-migration-guide#migrate-programmatically

 

 

posted @   路边两盏灯  阅读(173)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
历史上的今天:
2021-06-21 【Azure Redis 缓存】由Azure Redis是否可以自定义密码而引申出Azure PaaS的Redis服务是否可以和自建的Redis进行主从配置呢?
点击右上角即可分享
微信分享提示