Hi is safe to delete zookeeper logs from /var/lib/docker/volumes/sentry_onpremise_sentry-zookeeper-log/_data/version-2
ls -lsahtr
8.0K -rw-r–r-- 1 root root 65M Feb 16 00:19 log.cf3
8.0K -rw-r–r-- 1 root root 65M Feb 17 00:19 log.d08
8.0K -rw-r–r-- 1 root root 65M Feb 18 00:19 log.d1d
8.0K -rw-r–r-- 1 root root 65M Feb 19 00:19 log.d32
8.0K -rw-r–r-- 1 root root 65M Feb 20 00:19 log.d47
4.0K drwxr-xr-x 2 root root 4.0K Feb 20 00:34 .
8.0K -rw-r–r-- 1 root root 65M Feb 20 00:34 log.d5c
Lots of files there. But not sure if i can delete them or not. Whats the proper way how to cleanup zookeeper logs ?
2.I run everyday backup script
for i in sentry-data sentry-postgres sentry-redis sentry-zookeeper sentry-kafka sentry-clickhouse sentry-symbolicator; do
docker run -v $i:/volume --rm loomchild/volume-backup backup -c gz - > $BACKUP_DIR/volume-$i-$DATE.tar.gz
Is there any other (easier) way how to backup whole sentry for easy restore ?
These aren’t logs in the traditional sense. They’re transaction logs and are used by Zookeeper. You should be able to delete all but the latest snapshot, but I’m not entirely sure off hand. Read the documentation. The volume here should be really low though relatively, so it shouldn’t really be a concern.
tried code
root@24c9acfb7600:/# java -cp zookeeper.jar:log4j.jar:conf org.apache.zookeeper.server.PurgeTxnLog /var/lib/zookeeper/data /var/lib/zookeeper/log -n 10
Error: Could not find or load main class org.apache.zookeeper.server.PurgeTxnLog
but i cant find any zookeeper.jar file in whole system with