RedisDump 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global RedisDump --version 1.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local RedisDump --version 1.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=RedisDump&version=1.1.0
                    
nuke :add-package RedisDump --version 1.1.0
                    

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

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
2.1.0 122 13 days ago
2.1.0-ci0002 112 13 days ago
2.0.1-ci0001 113 13 days ago
2.0.0 115 14 days ago
1.2.0 116 14 days ago
1.1.1 125 15 days ago
1.1.0 121 15 days ago
0.2.0 116 14 days ago
0.2.0-ci0022 121 14 days ago
0.1.0 123 15 days ago