百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

redis-dump-go

> 数据库
开源

备份并恢复您的 Redis 服务器 - FAST

344 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

备份并恢复您的 Redis 服务器 - FAST

Redis-dump-go

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:

  • Will dump keys across several processes & connections
  • Uses SCAN rather than KEYS * for much reduced memory footprint with large databases
  • Easy to deploy & containerize - single binary.
  • Generates a RESP file rather than a JSON or a list of commands. This is faster to ingest, and recommended by Redis for mass-inserts.

Warning: like similar tools, Redis-dump-go does NOT provide Point-in-Time backups. Please use Redis backups methods when possible.

Features

  • Dumps all databases present on the Redis server
  • Keys TTL are preserved by default
  • Configurable Output (Redis commands, RESP)
  • Redis password-authentication

Installation

Download the appropriate version for your operating system on ŧhe release page, or use the Docker image:

bash
$ 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.

Run

$ ./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 dumped

For password-protected Redis servers, set the shell variable REDISDUMPGO_AUTH:

$ export REDISDUMPGO_AUTH=myRedisPassword
$ redis-dump-go

Build

Given 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 install

Importing the data

redis-cli --pipe < redis-backup.txt

Release Notes & Gotchas

  • By default, no cleanup is performed before inserting data. When importing the resulting file, hashes, sets and queues will be merged with data already present in the Redis.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Gobackupbackupsgoredis

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库