Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D027D5A8 for ; Sat, 22 Sep 2012 12:46:33 +0000 (UTC) Received: (qmail 13173 invoked by uid 500); 22 Sep 2012 12:46:31 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 12936 invoked by uid 500); 22 Sep 2012 12:46:30 -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 12907 invoked by uid 99); 22 Sep 2012 12:46:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Sep 2012 12:46:29 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.216.180] (HELO mail-qc0-f180.google.com) (209.85.216.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Sep 2012 12:46:23 +0000 Received: by qcmv28 with SMTP id v28so3252944qcm.11 for ; Sat, 22 Sep 2012 05:46:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding:x-gm-message-state; bh=wQ9ZuQuOHlX3PXjmCy0jMoWZ1OzJFAcZw5G1aZ1MyXI=; b=o7s+6nxtl2wm6my7T8w+Yrt6TmUdOktSt2D+c0aWnl5BHsiwanJz1AHeVFnp9ka6B9 wJUuoGMwGGMtJl3vlI0y8e0cAdEyg99KVKhzZpQgzXLQG7U8XdnBf8FfxGzUWOehQugG LDOMsL3aBOLhuHI/Q0ezwMexXjT2ojt/mkALh+PPSowb03qxVpVE0BtJ2ztthMyqjJWE AGTxYWUjrB+qA4izAoZ2Zlne7jZU9Wil5VlICTpbC9bXRuREudQwNI0HaAJa6hLNv+Y5 04kBP1ZPJG+wRgTWziFtl2BH2X8vt2BcFNbOpZNbN0dPqdpJq1bBVIdUROOvfGLJ9bz2 R1sw== MIME-Version: 1.0 Received: by 10.224.173.84 with SMTP id o20mr19211267qaz.3.1348317962208; Sat, 22 Sep 2012 05:46:02 -0700 (PDT) Received: by 10.229.118.88 with HTTP; Sat, 22 Sep 2012 05:46:02 -0700 (PDT) In-Reply-To: References: Date: Sat, 22 Sep 2012 14:46:02 +0200 Message-ID: Subject: Re: recovering data from an unfinished compaction db From: =?ISO-8859-2?Q?Rudi_Benkovi=E8?= To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQnhV/0DVrNzoYUe0YZWi/e9dE8NMZ4wT5P8JbFFjXGRdJemQwj10gve6+zhG3gVlL+ktkHO X-Virus-Checked: Checked by ClamAV on apache.org CouchDB doesn't recognize it. It's probably corrupted because the partition ran out of free space during compaction itself. Does CouchDB try to find a valid root node by reading the DB file from the tail and skipping over "random" binary data? In that case I might just have to let it run for some time before it finds it. --Rudi On Sat, Sep 22, 2012 at 2:40 PM, Robert Newson wrote: > The compacted file is a valid couchdb database, it should not be > "corrupted", simply rename it to .couch. > > Obviously you will have lost any data that didn't make it over to the > .compact file from the original .couch file that you have mistakenly > deleted. > > B. > > On 22 September 2012 10:56, Rudi Benkovi=C4=8D wrot= e: >> Hi, >> >> I have a .couch file where compaction hasn't finished its job and >> we've lost the pre-compaction production DB file (an unfortunate >> sysadmin error). Running CouchDB 1.2.0, so the new, corrupted file is >> in disk format version 6, with snappy compression. >> >> I've tried using recover-couchdb >> (https://github.com/jhs/recover-couchdb), but it crashes with the >> message that disk format 6 isn't supported. I've also tried dropping >> in 1.2.0 sources, but that also didn't work. >> >> Anyway, any hints on how to recover the data? 180GB file, lots of attach= ments. >> >> Many thanks! >> >> --Rudi