Skip to main content
Any Framework

A .NET command-line tool for dumping and restoring Redis data

Published
Mar 27, 2025
1y ago
Total Downloads
2.6K
2,625

Install

dotnet add package RedisDump --version 0.2.0-ci0022

No framework information available.

README

Redis Dump Tool

A .NET command-line tool for dumping and restoring Redis data.

Installation

# Install globally
dotnet tool install --global RedisDump

# Install locally in the current directory
dotnet tool install --local RedisDump

Usage

Dump Redis Data

Dump all data from Redis to a file:

redis-dump dump --connection "localhost:6379" --output "redis-backup.json"

Dump a specific database:

redis-dump dump --connection "localhost:6379" --database 0 --output "redis-backup.json"

Options:

  • -c, --connection <CONNECTION_STRING>: Redis connection string (default: localhost:6379)
  • -d, --database <DATABASE>: Database number (optional, omit to dump all databases)
  • -p, --password <PASSWORD>: Redis password (if required)
  • -o, --output <FILE>: Output file path (default: redis-dump.json)
  • --verbose: Show verbose output

Restore Redis Data

Restore data from a file to Redis:

redis-dump restore --connection "localhost:6379" --input "redis-backup.json"

Restore to a specific database:

redis-dump restore --connection "localhost:6379" --database 0 --input "redis-backup.json"

Options:

  • -c, --connection <CONNECTION_STRING>: Redis connection string (default: localhost:6379)
  • -d, --database <DATABASE>: Database number (optional, omit to restore all databases)
  • -p, --password <PASSWORD>: Redis password (if required)
  • -i, --input <FILE>: Input file path (default: redis-dump.json)
  • --flush: Flush the database before restoring
  • --verbose: Show verbose output

Features

  • Dumps and restores all Redis data types (string, list, set, sorted set, hash)
  • Preserves TTL values
  • Supports multiple databases
  • Beautiful console output with progress bars
  • JSON preview with verbose mode
  • Authentication support with password

Example

# Dump all Redis data
redis-dump dump --connection "redis-server:6379" --password "mypassword" --output "backup.json" --verbose

# Restore data to a new Redis server
redis-dump restore --connection "new-redis-server:6379" --password "newpassword" --input "backup.json" --flush

Development

Building from Source

git clone https://github.com/yourusername/RedisDump.git
cd RedisDump
dotnet build

Creating and Installing the Tool Locally

dotnet pack
dotnet tool install --global --add-source ./RedisDump/nupkg RedisDump

License

MIT

Changes from Previous Version

No structural changes between v0.1.0 and v0.2.0-ci0022.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

This version is marked prerelease. Validate its API and upgrade path before production use.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.