Created
October 27, 2024 23:41
-
-
Save sonirico/be848d2451973cc065f9affbd6a7916e to your computer and use it in GitHub Desktop.
redis dump minimal script
This file contains 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
#!/usr/bin/env bash | |
REDIS_SOURCE_PORT=2222 | |
redis-cli -p $REDIS_SOURCE_PORT --scan | while read -r key; do | |
redis-cli -p $REDIS_SOURCE_PORT -D "" --raw dump "$key" > key.dump ; | |
redis-cli -X dump_tag restore $key 0 dump_tag replace < key.dump | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment