Hi there, I'm not sure what the API command you're referring to does. Does it delete the whole data tree or a subtree or what? If you populate the data directory with a consistent snapshot/log pair, then I don't see why you shouldn't be able to recover at least some of your data. The sequence of steps should be:
- Copy appropriate files to the data/log directory of all replicas - Start the replicas - Check if it loaded the data tree successfully In general, ZK doesn't need back up and what many applications end up doing is having a way to reconstruct the data tree in the case of disaster, like deleting accidentally the whole data tree. -Flavio > On 21 Feb 2016, at 08:29, AALISHE <[email protected]> wrote: > > Hi all, > > I have a CDH cluster with ZK 3.4.5 running on 3 nodes ....and one of the > developers accidentlly ran an API command that does zooKeeperCleanUp > > I didnt know before this about ZK needing backups .... so there is no > backup(s) on-hand. > > But I see some kind logs and snapshot files under zookeeper lib/data > (attached as well) > > 65M Feb 19 05:48 log.900000001 > 18K Feb 19 07:19 snapshot.9000000a0 > 65M Feb 19 08:14 log.a00000001 > 18K Feb 19 08:21 snapshot.a00000759 > 65M Feb 19 08:22 log.b00000001 > 17K Feb 19 08:27 snapshot.c00000000 > 2 Feb 19 11:39 acceptedEpoch > 21K Feb 19 11:39 snapshot.c000016c7 > 2 Feb 19 11:39 currentEpoch > 129M Feb 20 04:21 log.c00000001 > 21K Feb 20 04:21 snapshot.d000184ec > 65M Feb 20 17:50 log.d000184ed > 23K Feb 20 17:50 snapshot.d0002bf88 > 4.0K Feb 20 17:50 . > 65M Feb 21 03:24 log.d0002bf89 > > > > this incident happened on *Feb 20 17:50 * .... as you can see the > snapshot and log files stamped with earlier hour *Feb 20 04:21 *are larger > insize.... > > > I think these last 2 files might the restore candidates? if Yes ... how > do I properly restore to that point ?? > > > cheers!
