Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 20372 invoked from network); 22 Aug 2008 08:23:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Aug 2008 08:23:32 -0000 Received: (qmail 41865 invoked by uid 500); 22 Aug 2008 08:23:29 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 41827 invoked by uid 500); 22 Aug 2008 08:23:29 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 41815 invoked by uid 99); 22 Aug 2008 08:23:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Aug 2008 01:23:29 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [83.97.50.139] (HELO jan.prima.de) (83.97.50.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Aug 2008 08:22:31 +0000 Received: from [10.0.1.5] (e178193059.adsl.alicedsl.de [::ffff:85.178.193.59]) (AUTH: LOGIN jan, SSL: TLSv1/SSLv3,128bits,AES128-SHA) by jan.prima.de with esmtp; Fri, 22 Aug 2008 08:22:01 +0000 Message-Id: <89592329-2474-4B25-A0EC-BD3349935A15@apache.org> From: Jan Lehnardt To: couchdb-user@incubator.apache.org In-Reply-To: <0B97E4E2-DE0D-4260-BAE4-5274DE295D6E@apache.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v928.1) Subject: Re: Backup of couchdb Date: Fri, 22 Aug 2008 10:22:59 +0200 References: <36BA0C90-01F5-4775-999D-B9687F88B0ED@me.com> <53b9568a0808212239w6343eb9ai9d54c716d98a5a26@mail.gmail.com> <0B97E4E2-DE0D-4260-BAE4-5274DE295D6E@apache.org> X-Mailer: Apple Mail (2.928.1) X-Virus-Checked: Checked by ClamAV on apache.org On Aug 22, 2008, at 09:47, Jan Lehnardt wrote: > > On Aug 22, 2008, at 08:12, Niket Patel wrote: > >> >> On Aug 22, 2008, at 11:09 AM, Jason Huggins wrote: >> >>> Just to be clear... is it okay to make a "hot backup" of that file >>> while the server is still running? (I would think so, give it's >>> append-only storage design.) >> >> More information on this will be helpful from couchdb developer. >> If backup doesn't have some recently added records between backup >> start and finish.. >> thats fine >> >> But if this can corrupt db file, we have to think other backup >> options >> replication should not considered as backup. > > > After each write, a database file is guaranteed to be consistent on > disk (unless you are on an OS that doesn't handle fsync() properly). > > If you disable writes to a database during the time of a backup, you > can make a "hot" copy. You might not consider that "hot" anymore > though. Reads can still go to the file. > > Or have two nodes, one of which is your live-node and the other one > is your backup-node. Have the backup-node replicate from the live > node up to a certain point. Then shut it down (or leave it idle) and > make a filesystem copy of the replicated database. In addition to that, note that two nodes can run on the same machine, so there's no need to multiple EC2 instances or more hardware. Cheers Jan --