Backup & Restore your Redis server - FAST
Dump Redis keys to a file. Similar in spirit to https://www.npmjs.com/package/redis-dump and https://github.com/delano/redis-dump but:
Warning: like similar tools, Redis-dump-go does NOT provide Point-in-Time backups. Please use Redis backups methods when possible.
Download the appropriate version for your operating system on ŧhe release page, or use the Docker image:
$ docker run ghcr.io/yannh/redis-dump-go:latest -h
Usage of /redis-dump-go:
[...]Bandwidth costs: Redis-dump-go is hosted on on Github Container Registry which is currently in Beta. During that period, bandwidth is free. After that period, a Github Account might be required / bandwidth costs might be applicable.
$ ./bin/redis-dump-go -h
Usage of ./bin/redis-dump-go:
-batchSize int
HSET/RPUSH/SADD/ZADD only add 'batchSize' items at a time (default 1000)
-db uint
only dump this database (default: all databases)
-filter string
Key filter to use (default "*")
-host string
Server host (default "127.0.0.1")
-n int
Parallel workers (default 10)
-noscan
Use KEYS * instead of SCAN - for Redis dump.resp
Database 0: 9 element dumped
Database 1: 1 element dumpedFor password-protected Redis servers, set the shell variable REDISDUMPGO_AUTH:
$ export REDISDUMPGO_AUTH=myRedisPassword
$ redis-dump-goGiven a correctly configured Go environment:
$ go get github.com/yannh/redis-dump-go
$ cd ${GOPATH}/src/github.com/yannh/redis-dump-go
$ go test ./...
$ go installredis-cli --pipe < redis-backup.txtNo open issues yet, or sync has not completed.