Skip to content

Instantly share code, notes, and snippets.

@SikhNerd
SikhNerd / google-cloud-memorystore-dump.md
Created May 8, 2019 20:18 — forked from basiszwo/google-cloud-memorystore-dump.md
Dump Redis rdb file from Google Cloud MemoryStore

Dumping a redis rdb file from a Google Cloud MemoryStore is easier than expected using redis-cli

Command

redis-cli -h <IP of MemoryStore Instance> --rdb dump.rdb
@SikhNerd
SikhNerd / migrate-redis.py
Last active October 1, 2019 08:47 — forked from maljolani/migrate-redis.py
Migrate Redis data on Amazon ElastiCache
"""
Forked and heavily adappted from:
https://gist.github.com/kitwalker12/517d99c3835975ad4d1718d28a63553e
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.
#!/path/to/redmine/script/runner
Repository.all.each(&:"destroy!")