coucharchive

Create and restore backups of a whole CouchDB server, with simple tar.gz files.


License
MIT
Install
pip install coucharchive==2.4.0

Documentation

coucharchive

Use coucharchive to create and restore backups of a whole CouchDB server / cluster of servers, or to simply replicate it to another server / cluster.

Backup archives are saved as single tar.gz file, and can be imported later to any other CouchDB server.

Useful for making backups, or replicating your database to a secondary test environment.

Installation

Using pip:

Examples

Make a backup archive from a running server:

Restore this archive to another server:

Simply load a backup in a temporary CouchDB server:

Replicate from a CouchDB installation to another one:

Slow down replication (to decrease servers load) so that it runs in one hour:

Don't pass credentials on the command line:

How do archives work?

coucharchive spawns a local CouchDB instance locally, using a temporary directory for storing data and configuration.

When dumping, it replicates your source CouchDB server (i.e. replicates all dbs, including _users) to the fresh local one, then saves and compresses its data to a tar.gz archive.

When loading, it uncompresses the archive, has the local CouchDB instance use it as its data, then replicates to your remote CouchDB server.

Go further

For repetitive backups, you can use a config file:

To save a backup on AWS S3 and notify somebody via email:

Troubleshooting

OSError: [Errno 28] No space left on device

coucharchive uses the /tmp folder, which can be to small.

If it's the case you can try to enlarge it, for example: