Skip to content

Instantly share code, notes, and snippets.

@basiszwo
Last active October 14, 2022 21:15
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save basiszwo/0382f3b2e224fdf90a3f4168bdb27a41 to your computer and use it in GitHub Desktop.
Save basiszwo/0382f3b2e224fdf90a3f4168bdb27a41 to your computer and use it in GitHub Desktop.
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

Restore rdb file from localhost to a Google Cloud MemoryStore instance

Command

rdb command is available by installing rdb-tools

rdb --command protocol ~/dump.rdb | redis-cli -h <IP of MemoryStore Instance> -p <Port of MemoryStore Instance> --pipe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment