Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 57352 invoked from network); 7 Apr 2009 03:04:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Apr 2009 03:04:43 -0000 Received: (qmail 63229 invoked by uid 500); 7 Apr 2009 03:04:42 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 63134 invoked by uid 500); 7 Apr 2009 03:04:42 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 63124 invoked by uid 99); 7 Apr 2009 03:04:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2009 03:04:42 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dundeemt@gmail.com designates 74.125.46.31 as permitted sender) Received: from [74.125.46.31] (HELO yw-out-2324.google.com) (74.125.46.31) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2009 03:04:34 +0000 Received: by yw-out-2324.google.com with SMTP id 9so1433365ywe.5 for ; Mon, 06 Apr 2009 20:04:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=bUJxjMWbzDvMgHYKz+IDFoSX3h17/H7Ui7qxhtkf9Vs=; b=ZonvtrZMA3XeH7fdqtXYLmXox8Pf/sqNZJA1Xs3aTdFVfav36y2JnC6kRRjA3tFXNm neHVBeyN4pG5bJSrevj2gl1Q/SACRuP2Ji/71dyZo4u4QJrDTgfXZ4sBMvafCSJza1b9 26OhNhBbRoyKt3kypTO4jKllVOjj4wzQCutuE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=Qkz4UdmFsHqf8erS3LNhUghajJdem5fIclpgT0N61dqIsQTDh1obBvySr1/+r9Ev3n NIF7qoocNF60q/IoN9bAIHyVLDXlR2wtASDwfpslEQIWUTL5jJIUInuKt4YicECfxLAk Zz0/Qb3XDB5WOfAtWMV0hFS+MlrJrxOg6Hzh8= MIME-Version: 1.0 Sender: dundeemt@gmail.com Received: by 10.150.138.1 with SMTP id l1mr8244960ybd.212.1239073453182; Mon, 06 Apr 2009 20:04:13 -0700 (PDT) Date: Mon, 6 Apr 2009 22:04:12 -0500 X-Google-Sender-Auth: 4d682d5f2f586f15 Message-ID: <5aaed53f0904062004k3d498f58ie04fd083547e5476@mail.gmail.com> Subject: Inability to back up and restore properly From: "Jeff Hinrichs - DM&T" To: couchdb-user Content-Type: multipart/alternative; boundary=000e0cd3107e0733340466ee45db X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd3107e0733340466ee45db Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit What is the proper way to backup and restore a couchdb? I mean a real proper dump/load cycle. couchdb doesn't provide a way to do a proper dump/reload cycle which leaves us to try and write our own. However, if you dump a document like {'_id':'foo',''_rev':'2-xyz',...} There is not a single way that I can find to load an empty database and recreate that same record. If you put the {'_id':'foo',''_rev':'2-xyz',...}, you get {'_id':'foo',''_rev':'3-mno',...}, which is not the same as {'_id':'foo',''_rev':'2-xyz',...}. In some use cases it is necessary to be able to restore data to the way it was at a point in time. Sometimes for logic reasons, some times for error recovery and debugging and some times for legal reasons. The seemingly only way possible to do that is to bring up another couchdb instance and replicate to it. However, that is a bit problematic for normal long term storage methodologies. What is the API I should be using? If no such api exists, is it an oversight or just a matter of resources? There should be a way to load data into couch and have couchdb just accept it, keeping the _rev information that is passed. I am not proposing to change the mode of operation, but to create a new one. Even better would be to have couchdb do a /database/_dump that streams out documents and a post /database/_load with the posted file from the /database/_dump. so that you have some couchdb database foo in state 'A', you dump, then create database bar, and load the dump from foo and when the process is finished, a replication from foo state 'A' to bar results in {"start_time":"Tue, 07 Apr 2009 03:02:16 GMT","end_time":"Tue, 07 Apr 2009 03:02:16 GMT","start_last_seq":0,"end_last_seq":100,"missing_checked":100,"missing_found":0,"docs_read":0,"docs_written":0,"doc_write_failures":0} Regards, Jeff Hinrichs --000e0cd3107e0733340466ee45db--