hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Hunt <ph...@apache.org>
Subject Re: Backing up zk data files
Date Thu, 12 Aug 2010 08:36:24 GMT

On 08/11/2010 06:49 PM, Adam Rosien wrote:
> http://hadoop.apache.org/zookeeper/docs/r3.3.1/zookeeperAdmin.html#sc_dataFileManagement
> says that one can copy the contents of the data directory and use it
> on another machine. The example states the other instance is not in
> the server list; what would happen if one did copy it to an offline
> member of the quorum that then starts up?

The previously offline member will contact the quorum leader and see 
that it has an older version of the db, it will then synchronize with 
the leader as usual. (either by d/l a diff or if too bar behind getting 
a full snapshot).

> Do the docs imply that one can copy the data directory as-is as a
> backup method? Is it "restorable" to any crashed/hosed server, or only
> the one with the same server id?

It can be copied "as is". Keep in mind though this is only needed for 
catastrophic failures (the entire zk serving cluster is lost) - not the 
case where a single server loses it's HD for example, in that case you 
just restart the server - it will contact the leader and synchronize as 
I detailed above.

> What is a valid backup method for zk data?

Copy the datadirectory (snapshots and logs)


View raw message