Skip to content

Instantly share code, notes, and snippets.

@depy
Last active December 30, 2015 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save depy/7787731 to your computer and use it in GitHub Desktop.
Save depy/7787731 to your computer and use it in GitHub Desktop.
redisSrc = Redis.connect :timeout => 20, :url => "redis://some.host.com:11111"
redisDest = Redis.connect :timeout => 20, :url => "redis://other.host.com:22222"
redisSrc.keys("*").each do |key|
data = redisSrc.dump key
redisDest.restore key, 0, data
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment