Search code examples
yugabytedb

Purging old log files in YugabyteDB


[Question posted by a user on YugabyteDB Community Slack]

How can I configure the YugaByte server logs to purge every few days? They seem to fill up fast and my server runs out of disk. Especially the yb-tserver logs. Apart from the logs folder, which other directories keep growing and will need to remove old files regularly??


Solution

  • YugabyteDB does not do log rotation out of the box. And there is no other directory where you can purge old files. But you could set it up with, say, systemd, and use, say, systemd log rotation.

    You can also use cron to clean up old log files.

    There is an issue you can track for the database to rotate the logs: https://github.com/yugabyte/yugabyte-db/issues/3604