Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Bryan Sazon
Bryan Sazon

Posted on

     

Cleaning up Zookeeper Logs and Snapshots

Problem

Zookeeper’s logs and snapshots are mostly responsible for its high disk usage. If your team makes use of these snapshots for specific purposes, it makes sense to back them up using your tool of preference.

My team uses ClickHouse and it uses Zookeeper for replication. So in our case, we don't need to keep snapshots.

Solution

To clean up manually, all you have to do is run the cleanup script.

# Go to wherever zookeeper bin is installed in your servercd /opt/zookeeper/bin# Run the script./zkCleanup.sh-n 10

Where 10 is the number of old snaps/logs you want to keep, the value should be greater than or equal to 3.

Repeat the completed steps to all the Zookeeper replica server.

See thescript for reference.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

8 years in the biz.Backend Engineer (Go).System Administrator (Kubernetes, Linux, Cloud).
  • Location
    Berlin
  • Education
    BSIT
  • Work
    Backend Engineer at 24metrics
  • Joined

More fromBryan Sazon

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp