Created
February 9, 2017 17:27
-
-
Save zinovyev/e99384f2672f6705764ebd26330c51df to your computer and use it in GitHub Desktop.
Redis dump in bash
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-cli KEYS "*" | awk "{print \"echo \\\"RESTORE \"\$1\" 0 \`redis-cli --csv DUMP \\\"\"\$1\"\\\"\` \\\" \"}" | bash > dump.bkp | |
# to restore use: cat dump.bkp | redis-cli |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment