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 A56BCD653 for ; Sat, 22 Sep 2012 13:02:14 +0000 (UTC) Received: (qmail 42958 invoked by uid 500); 22 Sep 2012 13:02:13 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 42852 invoked by uid 500); 22 Sep 2012 13:02:13 -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 42768 invoked by uid 99); 22 Sep 2012 13:02:12 -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 13:02:12 +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 13:02:06 +0000 Received: by qcmv28 with SMTP id v28so3258827qcm.11 for ; Sat, 22 Sep 2012 06:01:35 -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=56q9va/q0HQZCIyrhtdYu97I/3fXUwy/1h9pOUlenpg=; b=QtD7xvGOguOy5eRPQb0zkqCSo50u3pX6v8afq6A6BRiaQ+/JjOVkDG9nuDgoDm5Ap5 o0GtAxT6F/mSyw3R/8BgFf8w002C3B4KuQWwl9mI7QG2lTNWAUYdyGzR28oyEd0GRza3 OuCtaFQtZfVCrEVhqWE0NhmYqLDp+kf2uvNLf/a8ie/D50x1F2KhZ4uy1qMTDEjfcQCX sooIsCpRB9slpwwkZ8GO3evpTOD2us4TQ6rRr0C1DUtJKMPR5jEPjAQJyCmOhBQ8xsge LF7olaKZDqU79MVPRTIUu13EueWFnXUHbbljNnEpnnouS9iSbkKJFR4Ik3PABC0YeCPp Pk/w== MIME-Version: 1.0 Received: by 10.229.137.71 with SMTP id v7mr5188981qct.137.1348318895564; Sat, 22 Sep 2012 06:01:35 -0700 (PDT) Received: by 10.229.118.88 with HTTP; Sat, 22 Sep 2012 06:01:35 -0700 (PDT) In-Reply-To: References: Date: Sat, 22 Sep 2012 15:01:35 +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: ALoCoQlQf1gQ40trHohmL5Im+yAeCwPWJAzdHlifMxPPpzLjRJCucOzT1H+54jKlkWYh8C9FUwJb X-Virus-Checked: Checked by ClamAV on apache.org Ok, thanks for the tip. I left it running for about 15 minutes, however that was on hardware with terribly slow IO (something like 10MB/s). There was no exception (yet?), however Futon or direct HTTP access to DB didn't produce any output. I'm copying the 180gig file across the Atlantic to try rebuilding it on some fast SSD drives. Will let you know how it goes. Thanks! --Rudi On Sat, Sep 22, 2012 at 2:49 PM, Robert Newson wrote: > Yup, CouchDB starts from the end of the file and looks backwards until > it finds a valid footer, it can take some time if that's a long way > from the end. It's not so much that CouchDB is skipping over "random > binary data", it just doesn't have any pointers to that area of the > file. > > How long as couchdb been seeking backward for a footer? When you say > "doesn't recognize it", are you getting an error message? > > B. > > On 22 September 2012 13:46, Rudi Benkovi=C4=8D wrot= e: >> 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 wrot= e: >>> 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 wr= ote: >>>> 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 atta= chments. >>>> >>>> Many thanks! >>>> >>>> --Rudi