From ebd9eb990b2079ce5f96f37caf6172e42ebdb6d8 Mon Sep 17 00:00:00 2001 From: Richard Lee <14349+dlackty@users.noreply.github.com> Date: Sat, 5 Apr 2025 02:19:13 +0800 Subject: [PATCH 1/2] Enhance README with updated usage instructions --- Readme.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index aff6d0e..b3b3dcc 100644 --- a/Readme.md +++ b/Readme.md @@ -36,15 +36,24 @@ a Github Account might be required / bandwidth costs might be applicable. ``` $ ./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 From baaa52bd5d0d437c0bd8e057e097cbf77978e925 Mon Sep 17 00:00:00 2001 From: Richard Lee <14349+dlackty@users.noreply.github.com> Date: Sat, 5 Apr 2025 02:19:47 +0800 Subject: [PATCH 2/2] Update README to format code blocks as bash --- Readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Readme.md b/Readme.md index b3b3dcc..a3ad393 100644 --- a/Readme.md +++ b/Readme.md @@ -34,7 +34,7 @@ a Github Account might be required / bandwidth costs might be applicable. ## Run -``` +```bash $ ./bin/redis-dump-go -h Usage: ./bin/redis-dump-go [OPTION]... -batchSize int @@ -77,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 ``` @@ -86,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 ./... @@ -95,7 +95,7 @@ $ go install ## Importing the data -``` +```bash redis-cli --pipe < redis-backup.txt ```