Created
January 4, 2018 21:02
-
-
Save elhoyos/a3d7c27c717741a5bab58141c065f29f to your computer and use it in GitHub Desktop.
Export/Import remote redis data
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
$ ssh redis-server "redis-cli -h redis.host.com --csv hgetall {s0m3key}" | \ | |
awk -F, '{ gsub(/","/,"\" \"",$0); print "HMSET", "{s0m3key}", $0 }' - | redis-cli --pipe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment