Registry / database / node-redis-dump

node-redis-dump

JSON →
library0.2.1jsnpmunverified

A Node.js library for backing up and restoring Redis data by exporting keys and values. The current version is 0.2.1, last updated in 2014, with no recent releases. It relies on the redis npm package and operates by connecting to a Redis instance and scanning keys. The library provides a simple API to dump all data to a format that can be re-imported. Unlike more modern tools like redis-dump-go or redis-commander's export, this package is outdated, not actively maintained, and uses callbacks without promise support.

npm install node-redis-dump
INSTALL
IMPORT
SIG · NODE-REDIS-DUMP
N
node-redis-dump
databasejavascriptv0.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RedisDump
✓ const RedisDump = require('node-redis-dump');
✗ import RedisDump from 'node-redis-dump';
The package uses CommonJS and has no ES module support; default import will fail in ESM context
RedisDump constructor options
✓ const dump = new RedisDump({ host: 'localhost', port: 6379, password: '' });
✗ const dump = new RedisDump('localhost', 6379, '');
Options must be an object; positional arguments will be ignored
dump.export callback
✓ dump.export({ type: 'redis', callback: (err, data) => { ... } });
✗ dump.export({ type: 'redis' }).then(data => ...);
Method does not return a Promise; callback-only pattern

Connects to Redis, exports all keys via SCAN, and logs the result as a formatted dump.

const RedisDump = require('node-redis-dump'); const dump = new RedisDump({ host: 'localhost', port: 6379, password: process.env.REDIS_PASSWORD || '' }); dump.connect(); dump.export({ type: 'redis', callback: function(err, data) { if (err) { console.error('Dump failed:', err); return; } console.log('Redis dump data:', data); } });
Debug
Known issues
deprecatedPackage is no longer maintained; last update 2014.
fix
Consider alternatives like redis-dump-go or using built-in Redis commands (e.g., redis-cli --rdb).
affects: >=0.1.0
breakingThe 'isCompress' option is documented but not working.
fix
Do not rely on compression; output will always be uncompressed.
affects: >=0.2.0
gotchaThe 'export' method uses callback; no promise support.
fix
Wrap in a Promise manually if using async/await: new Promise((resolve, reject) => dump.export({ callback: (err, data) => err ? reject(err) : resolve(data) }));
affects: >=0.1.0
gotchaThe constructor expects an options object; passing arguments positionally fails silently.
fix
Always pass a single object: new RedisDump({ host: '...', port: 6379 });
affects: >=0.1.0
Errors
Common errors & fixes
Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED
Redis server is not running or not accessible at the specified host/port.
fix
Ensure Redis is running: redis-server or check host/port configuration.
TypeError: dump.export is not a function
Calling export before calling connect or using a malformed instance.
fix
Always call dump.connect() after creating the instance and before calling export.
Cannot find module 'node-redis-dump'
Package not installed; installation from npm is not possible as it's not published.
fix
Clone the repository from GitHub and require the local path: const RedisDump = require('./node-redis-dump');
Upgrade
Version history
0.2.1latest on npm
Audit
Dependencies
redisrequiredRedis client dependency for connecting to Redis server
Agent activity
5 hits · last 30 days
node
4
Resources
node-redis-dump — npm install node-redis-dump · libregistry