
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
couchdb-backup-restore
Advanced tools
Creates backups of couchdb databases (.tar.gz files containing one .json file per database) and restores from those backups.
Creates backups of couchdb databases (.tar.gz files containing one .json file per database) and restores from those backups.
Also plays nice with Cloudant (hosted CouchDB service).
This library does not support attachments, right now. It will only back up and restore documents. PR's welcome.
This backs up only the current revision (_rev
) of each document; backing up and restoring will loose all previous revisions.
(This is normal behavior though - to quote the documentation, You cannot rely on document revisions for any other purpose than concurrency control.)
$ npm install --save couchdb-backup-restore
var cbr = require('couchdb-backup-restore');
var config = {credentials: 'http://localhost:5984'};
function done(err) {
if (err) {
return console.error(err);
}
console.log('all done!');
}
// backup
cbr.backup(config, done).pipe(fs.createWriteStream('./db-backup.tar.gz'))
// restore
fs.createReadStream('./db-backup.tar.gz').pipe(cbr.restore(config, done));
Bluemix / Cloudant example:
var cbr = require('couchdb-backup-restore');
var bluemix = require('bluemix');
var config = {
credentials: bluemix.getService('cloudantNoSQLDB').credentials
}
// or just var config = bluemix.getService('cloudantNoSQLDB');
Default options are:
{
credentials: 'http://localhost:5984',
excludeDbs: ['_replicator', '_users'], // automatic built-in dbs that you probably don't want to backup
databases: null
}
credentials
is passed directly to nano and can be either a straight url or a configuration object.excludeDbs
should be an array, although it may be an empty array ([]
) if you want to include the built-in _replicator
and _users
databases.databases
may be an array. If set, CBR will only back up the specified DBs, overriding the excludeDbs
option.MIT © Nathan Friedly
FAQs
Creates backups of couchdb databases (.tar.gz files containing one .json file per database) and restores from those backups.
The npm package couchdb-backup-restore receives a total of 20 weekly downloads. As such, couchdb-backup-restore popularity was classified as not popular.
We found that couchdb-backup-restore demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.