-
Notifications
You must be signed in to change notification settings - Fork 387
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
How to clean history logs safely ? #5
Comments
Sure, you can periodically delete everything in the log dir if you want, and that shouldn't break anything, but Cronicle does come with a nightly log archiver feature, if you want to use it. Just set this config param to a destination directory path, and all the logs will be gzipped, date/time stamped and stored there for you, wiping the logs directory as it does it: https://github.com/jhuckaby/Cronicle#log_archive_path log_archive_pathEvery night at midnight (local server time), the logs can be archived (gzipped) to a separate location. This parameter specifies the path, and the directory naming / filenaming convention of the archive files. It can utilize date placeholders including This can be a partial path, relative to the Cronicle base directory ( |
It works, thanks @jhuckaby ! I should read the manual first, hah~ |
Is there any way to move the archived files to S3 to free-up disk space on the local disk? |
@healthiansdotcom That feature is coming in Cronicle v2, but for v1 you can do it fairly easily with the AWS CLI, assuming you have that installed. Add this to a crontab or Cronicle shell event to run nightly:
The logs are archived every night at midnight, so it's better to avoid that hour, and run this later in the morning, maybe 3 AM. Hope this helps! |
RT, is there any suggestions? it seems all run history stored in logs dir, is it safe to complete erase everything under that dir ?
The text was updated successfully, but these errors were encountered: