redis的备份和还原,可以借助了第三方的工具:redis-dump
yum install ruby rubygems ruby-devel
gem sources –remove https://rubygems.org/
gem sources -a http://ruby.taobao.org/
gem sources -l
*** CURRENT SOURCES ***
gem install redis-dump -V
redis-dump -u 127.0.0.1:6379 > db.json //导出数据
redis-load -u 127.0.0.1:6379 < test.json redis-load //导入数据
- 本文固定链接: http://www.wy182000.com/2015/03/17/redis中使用redis-dump导出、导入、还原数据实例/
- 转载请注明: wy182000 于 Studio 发表