Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.
/ rump Public archive

Hot sync two Redis servers using dumps.

License

Notifications You must be signed in to change notification settings

stickermule/rump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rump.

Sync two Redis servers using dumps.

rump -from redis://1234.cache.amazonaws.com:6379/1 -to redis://127.0.0.1:6379/1

Why.

ElastiCache doesn't support any of the standard Redis backup commands.

Rump is able to transfer keys from an ElastiCache cluster or any Redis server to another Redis server, by only using SCAN, DUMP and RESTORE.

Features.

  • Uses SCAN instead of KEYS to avoid DoS your own server.
  • Can sync any key type.
  • Drops the TTL on purpose, since it wouldn't be in sync.
  • Doesn't use any temp file.
  • Uses buffered channels to optimize slow source servers.
  • Uses pipelines to minimize network roundtrips.

Examples.

# Sync local Redis DB 1 to DB 2.
$ rump -from redis://127.0.0.1:6379/1 -to redis://127.0.0.1:6379/2

# Sync ElastiCache cluster to local.
$ rump -from redis://production.cache.amazonaws.com:6379/1 -to redis://127.0.0.1:6379/1

# Sync protected ElastiCache via EC2 port forwarding.
$ ssh -L 6969:production.cache.amazonaws.com:6379 -N [email protected] &
$ rump -from redis://127.0.0.1:6969/1 -to redis://127.0.0.1:6379/1