Created
January 19, 2025 03:10
-
-
Save mbchoa/601e103da4ff291d3678d38a677d0fe8 to your computer and use it in GitHub Desktop.
Copy data from one Redis instance to another
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
redis-cli -u redis://default:pass@host:port --scan | while read key; do | |
value=$(redis-cli -u redis://default:pass@host:port get "$key") | |
redis-cli -u redis://default:default@host set "$key" "$value" | |
echo "Copied key: $key" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment