Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 91889823A for ; Tue, 16 Aug 2011 16:56:56 +0000 (UTC) Received: (qmail 89607 invoked by uid 500); 16 Aug 2011 16:56:55 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 89543 invoked by uid 500); 16 Aug 2011 16:56:55 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 89281 invoked by uid 99); 16 Aug 2011 16:56:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2011 16:56:55 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.212.52 as permitted sender) Received: from [209.85.212.52] (HELO mail-vw0-f52.google.com) (209.85.212.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2011 16:56:48 +0000 Received: by vws16 with SMTP id 16so138006vws.11 for ; Tue, 16 Aug 2011 09:56:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=+Qo8izuLsaObJTfwF6EZX8T+CGNMiXM+pAzkNPOa4Sk=; b=sBXkxjRNTxWg8ELwcpq4h/Pg9HWRd+Dp3sogEA89iwpLlXCc0MAliy+OP3O/oo/Rvv wcMtnO/oVKhm10uKQYzQaSO8S6cfgirr0mr0It5Tn2REK8tbkZrDE/Ib1EzBekFlV/ZI 07TjquG0TnF+bU0LzbgakmpZmT2WCQ7LQjdRM= Received: by 10.52.117.132 with SMTP id ke4mr5302150vdb.520.1313513788158; Tue, 16 Aug 2011 09:56:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.166.67 with HTTP; Tue, 16 Aug 2011 09:55:48 -0700 (PDT) In-Reply-To: References: From: Paul Davis Date: Tue, 16 Aug 2011 11:55:48 -0500 Message-ID: Subject: Re: The replicator needs a superuser mode To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Me and Adam were just mulling over a similar endpoint the other night that could be used to generate plain-text backups similar to what couchdb-dump and couchdb-load were doing. With the idea that there would be some special sauce to pipe from one _dump endpoint directly into a different _load handler. Obvious downfall was incremental-ness of this. Seems like it'd be doable, but I'm not entirely certain on the best method. I was also considering this as our full-proof 100% reliable method for migrating data between different CouchDB versions which we seem to screw up fairly regularly. +1 on the idea. Not sure about raw couch files as it limits the wider usefulness (and we already have scp). On Tue, Aug 16, 2011 at 10:24 AM, Jan Lehnardt wrote: > This is only slightly related, but I'm dreaming of /db/_dump and /db/_res= tore endpoints (the names don't matter, could be one with GET / PUT) that j= ust ships verbatim .couch files over HTTP. It would be for admins only, it = would not be incremental (although we might be able to add that), and I hav= en't yet thought through all the concurrency and error case implications, t= he above solves more than the proposed problem and in a very different, but= I thought I throw it in the mix. > > Cheers > Jan > -- > > On Aug 16, 2011, at 5:08 PM, Robert Newson wrote: > >> +1 on the intention but we'll need to be careful. The use case is >> specifically to allow verbatim migration of databases between servers. >> A separate role makes sense as I'm not sure of the consequences of >> explicitly granting this ability to the existing _admin role. >> >> B. >> >> On 16 August 2011 15:26, Adam Kocoloski wrote: >>> One of the principal uses of the replicator is to "make this database l= ook like that one". =A0We're unable to do that in the general case today be= cause of the combination of validation functions and out-of-order document = transfers. =A0It's entirely possible for a document to be saved in the sour= ce DB prior to the installation of a ddoc containing a validation function = that would have rejected the document, for the replicator to install the dd= oc in the target DB before replicating the other document, and for the othe= r document to then be rejected by the target DB. >>> >>> I propose we add a role which allows a user to bypass validation, or el= se extend that privilege to the _admin role. =A0We should still validate up= dates by default and add a way (a new qs param, for instance) to indicate t= hat validation should be skipped for a particular update. =A0Thoughts? >>> >>> Adam > >