Skip to content

Instantly share code, notes, and snippets.

View mustafakirimli's full-sized avatar
🏠
Working from home

Mustafa Kırımlı mustafakirimli

🏠
Working from home
View GitHub Profile
@mustafakirimli
mustafakirimli / migrate-redis.py
Last active February 18, 2018 13:56 — forked from thomasst/migrate-redis.py
Migrate Redis data on Amazon ElastiCache
"""
Copies all keys from the source Redis host to the destination Redis host.
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are
restricted (e.g. on Amazon ElastiCache).
The script scans through the keyspace of the given database number and uses
a pipeline of DUMP and RESTORE commands to migrate the keys.
Requires Redis 2.8.0 or higher.