New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-redis-dump2

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-redis-dump2

Backup and restore your Redis data written in node.js.

  • 0.6.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.5K
decreased by-41.2%
Maintainers
1
Weekly downloads
 
Created
Source

Node.js redis dump library

Backup and restore your Redis data written on node.js

This is a fork of the original "node-redis-dump" library from Dmitriy Yurchenko (https://github.com/EvilDevRu/node-redis-dump.git) to get bugfixes and security updates applied.

Installation

  $ npm install node-redis-dump2

Quick Start

The param object given to RedisDump is passed to "ioredis" library to create a new client from. After object initialization an explicit call to connect() must be done.

See examples/ directory for this too.

Parameter for export

Parameter for import

Examples

const RedisDump = require('./node-redis-dump');
let dump = new RedisDump({
    host: 'localhost',
    port: 6379,
    password: ''
});

dump.connect();
dump.export({
    type: 'redis',
    callback: function(err, data) {
        if (err) {
            console.log('Could\'t not make redis dump!', err);
            return;
        }

        console.log('--------- REDIS DUMP ----------');
        console.log(data);
        console.log('--------- /REDIS DUMP ----------');
    }
});

Optional an already existing redis client can be given to the constructor to reuse it.

const RedisDump = require('./node-redis-dump');
const Redis = require('ioredis');

let redis = new Redis({
    host: 'localhost',
    port: 6379,
    password: ''
});
let dump = new RedisDump({client: redis});

dump.export({
    type: 'redis',
    //isCompress: false, (not working now)
    callback: function(err, data) {
        if (err) {
            console.log('Could\'t not make redis dump!', err);
            return;
        }
    
        console.log('--------- REDIS DUMP ----------');
        console.log(data);
        console.log('--------- /REDIS DUMP ----------');
    }
});

Known Issues

  • does not work with Redis streams (neither export nor import)
  • "redis" type does not work with binary data (neither import into redis nor export from redis)

Keywords

FAQs

Package last updated on 02 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc