redis的迁移工具redis-port
如何将本地的redis迁移到阿里云的redis实例上redis-port:
工具的下载地址:http://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/assets/attach/85829/cn_zh/1533199526614/redis-port%282%29?spm=a2c4g.11186623.2.10.4b2d47cewY6twh
实例:
./redis-portsync--from=src_host:src_port --password=src_password--target=dst_host:dst_port --auth=dst_password[--filterkey="str1|str2|str3"] [--targetdb=DB] [--rewrite] [--bigkeysize=SIZE] [--logfile=REDISPORT.LOG]
./redis-port restore --input=/var/lib/redis/dump6381.rdb --target=r-tj7b67a031c321e4.redis.rds.aliyuncs.com:6379 --auth='密码' --filterdb=1(源库名称) --targetdb=3(库的名称)
参数的解释:
[*]src_host:自建 redis 域名(或者 IP)
[*]src_port:自建 redis 端口
[*]src_password:自建 redis 密码
[*]dst_host:云数据库 redis 域名
[*]dst_port:云数据库 redis 端口
[*]dst_password:云数据库 redis 密码
[*]str1|str2|str3:过滤具有 str1 或 str2 或 str3 的 key
[*]DB:将同步入云 redis 的 DB
[*]rewrite:覆盖已经写入的 key
[*]bigkeysize=SIZE:当写入的 value 大于 SIZE 时,走大 key 写入模式
页:
[1]