incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zachary Zolton <>
Subject Re: CouchDB maintenance script
Date Wed, 02 Feb 2011 17:09:16 GMT
And, if Ruby's more your cup of tea, I've got my own version of a
CouchDB maintenance script:

I've had this running on a weekly cron job to reclaim space for a few
months now, and it hasn't given me any trouble.

@Nils let's see if we can trade some ideas and make better scripts! (^_^)



On Wed, Feb 2, 2011 at 10:53 AM, Nils Breunese <> wrote:
> Hello,
> CouchDB requires some maintenance from time to time, so I created a Python script using
Benoit's Couchdbkit library to do the following for one or more CouchDB instances:
> * Compact all databases
> * Compact all views for all databases
> * Clean up all views for all databases
> Note that all these tasks are started at once, so if you have a lot of databases/views/data,
running this script might ask a lot of your server's resources. If anyone has a great idea
to do this in a 'better' way, let me know. (Polling the server for compact_running? Is this
also available for compacting views? Maybe just a dumb sleep before starting a next job?)
> You can find the code at under an MIT license.
I run it daily using cron myself. I hope this is useful for others as well.
> Nils.
> ------------------------------------------------------------------------
> ------------------------------------------------------------------------

View raw message