couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Smith <>
Subject Re: The replicator needs a superuser mode
Date Wed, 17 Aug 2011 01:28:17 GMT
On Tue, Aug 16, 2011 at 10:24 PM, Jan Lehnardt <> wrote:
> This is only slightly related, but I'm dreaming of /db/_dump and /db/_restore endpoints

Jan, I also had that dream at CouchOne, but now I think it is a very bad idea.

A database is a URL. Every URL is different. Cloning URL_A to URL_B is
tempting, but fundamentally anti-CouchDB.

There is a reason the security object does not replicate. Every URL
(or origin) is a different security environment, and it is meaningless
or wrong to apply A's security object to B's database.

Validation functions decide what to allow based on userCtx and secObj.
Both of those change (generally) with the URL. Cloning one database to
another IMO spits in the face of the architecture and philosophy of

IMHO, cloning a *database* is not desirable. Long-term, you really
want to replicate a database.

Cloning a *couch* (GET /_dump, PUT /_restore) would be awesome. That
is the right abstraction level. Among other reasons, it can include
the config. Maybe that is mission creep.

Iris Couch

View raw message