diff --git a/Readme.md b/Readme.md index aff6d0e..a3ad393 100644 --- a/Readme.md +++ b/Readme.md @@ -34,17 +34,26 @@ a Github Account might be required / bandwidth costs might be applicable. ## Run -``` +```bash $ ./bin/redis-dump-go -h -Usage of ./bin/redis-dump-go: +Usage: ./bin/redis-dump-go [OPTION]... -batchSize int HSET/RPUSH/SADD/ZADD only add 'batchSize' items at a time (default 1000) - -db uint - only dump this database (default: all databases) + -cacert string + CA Certificate file to verify with + -cert string + Private key file to authenticate with + -db int + only dump this database (default: all databases) (default -1) -filter string Key filter to use (default "*") + -h show help information -host string Server host (default "127.0.0.1") + -insecure + Allow insecure TLS connection by skipping cert validation + -key string + SSL private key file path -n int Parallel workers (default 10) -noscan @@ -54,8 +63,12 @@ Usage of ./bin/redis-dump-go: -port int Server port (default 6379) -s Silent mode (disable logging of progress / stats) + -tls + Establish a secure TLS connection -ttl Preserve Keys TTL (default true) + -user string + Username $ ./bin/redis-dump-go > dump.resp Database 0: 9 element dumped @@ -64,7 +77,7 @@ Database 1: 1 element dumped For password-protected Redis servers, set the shell variable REDISDUMPGO\_AUTH: -``` +```bash $ export REDISDUMPGO_AUTH=myRedisPassword $ redis-dump-go ``` @@ -73,7 +86,7 @@ $ redis-dump-go Given a correctly configured Go environment: -``` +```bash $ go get github.com/yannh/redis-dump-go $ cd ${GOPATH}/src/github.com/yannh/redis-dump-go $ go test ./... @@ -82,7 +95,7 @@ $ go install ## Importing the data -``` +```bash redis-cli --pipe < redis-backup.txt ```