Backup a Cloudant / CouchDB instance, using PouchDB.
npm install spare
|5||downloads in the last month|
|Version||0.2.0 last updated 5 months ago|
|Keywords||backup, couchdb, cloudant, pouchdb|
|Dependencies||pouchdb, commander, cron, forever-monitor|
Command line utility for taking periodic snapshots of a remote Cloudant / CouchDB instance, using PouchDB.
npm install -g spare
If that doesn't work, try prepending
To create a daily snapshot of a remote instance, use the
watch command, like this:
spare watch -r <remote>
To do a one-off backup of a remote instance, use
spare backup -r <remote>
You can also backup to another remote instance, rather than locally, using the
spare backup -r <remote> -t <target>
To restore a remote based on a local backup, use
spare restore -r <remote> -d <YYYY-MM-DD>
-d argument indicates a backup made on a certain day.
To destroy a local backup of a certain day, use
spare remove -r <remote> -d <YYYY-MM-DD>
To run any of these commands on a regular basis, try adding them to your crontab, like so:
crontab -e # now, in your text editor, add a command like this: @reboot spare watch -r <remote>
That will backup the given remote instance every day at midnight.