Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add restore command to ZK CLI #39

Merged
merged 3 commits into from
Mar 29, 2021
Merged

Add restore command to ZK CLI #39

merged 3 commits into from
Mar 29, 2021

Conversation

mgao0
Copy link
Collaborator

@mgao0 mgao0 commented Mar 22, 2021

This commit adds a CLI command to ZooKeeperMain, and it will allow zk admin to run commands on a machine to restore the backed-up zk snapshot and transaction log files up until a specified zxid or timestamp from backup storage to a local path. This enables the offline restoration of a zk server node to a desired time/zxid.

Tests added: testRestoreToZxidByCommandLine, testRestoreToTimestampByCommandLine
RestorationToolTest: 6 total, 6 passed
RestorationToolTest.testFailedRestorationWithOutOfRangeZxid passed 7.85s
RestorationToolTest.testSuccessfulRestorationToZxid passed 7.21s
RestorationToolTest.testRestoreToZxidByCommandLine passed 6.12s
RestorationToolTest.testRestoreToTimestampByCommandLine passed 7.45s
RestorationToolTest.testSuccessfulRestorationToLatest passed 5.92s
RestorationToolTest.testFailedRestorationWithLostLog passed 5.94s

@mgao0 mgao0 changed the title [WIP] Add restore command to ZK CLI Add restore command to ZK CLI Mar 24, 2021
@mgao0 mgao0 marked this pull request as ready for review March 24, 2021 23:52
Copy link

@narendly narendly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few minor comments - great work!

@mgao0 mgao0 merged commit 6b798f5 into li-dev/release-3.6.2-1-backup Mar 29, 2021
@mgao0 mgao0 deleted the cli branch March 29, 2021 20:55
narendly pushed a commit that referenced this pull request Nov 23, 2021
This commit adds a CLI command to ZooKeeperMain, and it will allow zk admin to run commands on a machine to restore the backed-up zk snapshot and transaction log files up until a specified zxid or timestamp from backup storage to a local path. This enables the offline restoration of a zk server node to a desired time/zxid.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants