We are using CouchDB 2.0 for storing files (.txt, .doc, .xls, .pdf, .mp3, .mp4, .zip). Files are uploaded and stored on CouchDB from our web application. Maximum upload size for a file being uploaded is 500 MB.
We want to backup CouchDB on regular basis from production server to backup server machine having CouchDB installed. We are using replication technique supported by CouchDB for backing up the data.
Following curl command works for replicating database:
curl -H "Content-Type: application/json" -X POST "http://localhost:5984/_replicate" -d {"source":"http://user:password@targetIP:5984/dbname","target":"sampledb","continuous":true}
Above command works well for replicating database that has all documents with text file attachments. But it does not work for database having documents with video or audio or pdf files as attachments.
Here are details about this problem - If a text file upto 500MB size is uploaded on CouchDB, it gets stored with compressed size much lesser than 500MB. And if CouchDB has only text files stored, replication works well without any problem. But if any media file, pdf or zip file is uploaded on CouchDB, it gets stored but without any compression, and CouchDB with these files does not replicate successfully. This typically happens when media files with more than 5mb are uploaded.
As a work around, we added video/* in compressible_types option from default.ini file. But still replicating db with documents having media attachment doesn't work.
Does anyone know about how to replicate CouchDB in such a case?
Any help is really appreciable.
Thanking you,
Jaqen H'ghar