-
-
Save slavone/45780e9050ea7d7b34a276ea31320e3b 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