[ Linux ] How To Copy db0 To db1 Of Redis Database

All of it is for Debian 7.9 Wheezy.

Prepare

We need to flush our destination db1

redis-cli -n 1 flushdb   #  -n arg is number of db

Installation of Tools

apt-get install ruby-full
apt-get install ruby-switch
ruby-switch --list            # look at versions of ruby installed in your system
ruby-switch --set ruby1.9.1   # we need version >= 1.9.1
gem install redis-copy 

Copy

redis-copy localhost:6379/0 localhost:6379/1

 

Documentation:

Ruby for Debian

Ruby Installation

Redis Copy GitHub

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *