Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-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 334CCCC84 for ; Fri, 19 Jul 2013 18:39:05 +0000 (UTC) Received: (qmail 21530 invoked by uid 500); 19 Jul 2013 18:39:04 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 21125 invoked by uid 500); 19 Jul 2013 18:39:02 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 21117 invoked by uid 99); 19 Jul 2013 18:39:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jul 2013 18:39:01 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of evolvah@gmail.com designates 209.85.216.181 as permitted sender) Received: from [209.85.216.181] (HELO mail-qc0-f181.google.com) (209.85.216.181) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jul 2013 18:38:55 +0000 Received: by mail-qc0-f181.google.com with SMTP id u12so2483768qcx.26 for ; Fri, 19 Jul 2013 11:38:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ec4hOfdt3AuM/Pe7Vrw45WukeaAJZAQKXhkanJ8SpsM=; b=XD6n6EE1z50UUXM9RZ+kOTkq2dXtz1yVKGQutvMiJJa2EIQ+DH4z/pL8+O5A3TuqWT YTX/rGCrosJTqf+5jGUBrfJZ/KB3hOQY+njxlxxx6DmOHO2h9NI/Wkevp4A8YwSogV/D YwAUvls5JAc9dgIMqvYfDWbljzuiVfsJCCTxpRBIld2cmU6HOg4xVUVanpyjhrBFo5GL ycNzR4Ey2i9BQ7+rVNZ/36caF5dOBE6K1yQFZQcrt0iCxM3eH1snyM/NKirDsIGJJnUV S29nPK/VSMkjo+a5MNEARUniifSBTISGDc8/NZLsk4LaLDLVuqR6rrbhFTQe7KVLoXEw q5dw== MIME-Version: 1.0 X-Received: by 10.49.71.99 with SMTP id t3mr2284410qeu.46.1374259114465; Fri, 19 Jul 2013 11:38:34 -0700 (PDT) Received: by 10.49.57.163 with HTTP; Fri, 19 Jul 2013 11:38:34 -0700 (PDT) In-Reply-To: References: <7527D9F1-F9A5-44C7-9739-790ECBE138CE@jordanzimmerman.com> Date: Fri, 19 Jul 2013 13:38:34 -0500 Message-ID: Subject: Re: Zookeeper ensemble backup questions? From: Sergey Maslyakov To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=047d7b677f5858e42304e1e1a25c X-Virus-Checked: Checked by ClamAV on apache.org --047d7b677f5858e42304e1e1a25c Content-Type: text/plain; charset=ISO-8859-1 Alexander, I cannot speak to that intelligently. I don't know implementation and design details well enough. However, a snapshot of this kind, if it is produced by ZooKeeperServer.takeSnapshot() method, should contain not just the DataTree content but the sessions too. I am not sure if this covers ephemeral nodes though but I am pretty sure this is way Zookeeper server takes snapshots driven by the transaction count. Regards, /Sergey On Fri, Jul 19, 2013 at 1:26 PM, Alexander Shraer wrote: > Sergey, > > Can you explain what happens with ephemeral nodes during snapshot and > restore ? > > Thanks, > Alex > > On Fri, Jul 19, 2013 at 11:21 AM, Sergey Maslyakov > wrote: > > Jordan, > > > > It depends on the use case. Some use cases deal with 99% or more of > static > > non-ephemeral nodes. And this is why the Exhibitor approach does not work > > for those use cases. > > > > > > Regards, > > /Sergey > > > > > > On Fri, Jul 19, 2013 at 1:13 PM, Jordan Zimmerman < > > jordan@jordanzimmerman.com> wrote: > > > >> I'm a bit late to this one but I don't understand the need for complete > >> backup of ZK data. In my experience, 99% of ZNodes are ephemeral. > >> Therefore, it would be wrong to restore those nodes. In a disaster, the > >> connection sessions would expire and you would not want ephemeral nodes > >> restored. This is why in Exhibitor I took the approach of selective > restore. > >> > >> -Jordan > >> > >> On Jul 19, 2013, at 11:00 AM, jack ma wrote: > >> > >> > I asked those question in the thread > >> > > >> > http://mail-archives.apache.org/mod_mbox/zookeeper-user/201307.mbox/%3cCAB+cfdwhOV0JfB04=MpO_+i-4ou=VbL=EG2XS557+j+698jx3A@mail.gmail.com%3e > >> , > >> > but there is no response for that. > >> > > >> > So I posted those questions again here, hopefully I could get helps > >> > from the community. > >> > > >> > I want to make sure I am fully understanding the procedures of > zookeeper > >> > backup and disaster recovery: > >> > > >> > For the backup procedures at zookeeper assemble: > >> > (1) Login to any host which state is "Serving" > >> > Question: > >> > Do I have to login to leader node, or any node is ok? > >> > (2) Copy latest snapshot file and transaction log from version-2 > >> directory. > >> > Question: > >> > How to make sure we do not copy corrupt files if the > >> > snapshot/transaction log is in the middle of update? Do we have to > >> shutdown > >> > the node to make the copy? > >> > besides the transaction log and snapshot, do we have > to > >> > copy other files such as the ecoch files > >> > > >> > For the disaster recovery procedures at zookeeper assemble: > >> > (1) recreate the machines for the zookeeper ensemble > >> > (2) copy snapshot/transaction log we backed up into the zookeeper > >> > dataDir\version-2 and logDir\version2. > >> > Question: > >> > Do we have to copy the epoch files? > >> > Do we have to copy snapshot/transaction log backed up > to > >> > all the zookeeper node, or just the first node we starts? > >> > > >> > Appreciate your time and help. > >> > Jack > >> > >> > --047d7b677f5858e42304e1e1a25c--