About this tool
Generate a logrotate rule with rotation frequency, retention, compression, create modes and postrotate hooks — with conflict warnings.
This generator builds a complete logrotate rule — the /etc/logrotate.d/ block that controls when a log rotates, how many old copies are kept, whether they are compressed, and what runs afterwards — using the directive syntax of logrotate(8). It is aimed at Linux administrators who want a correct rule with create modes, delaycompress and a postrotate reload hook, and it flags the classic conflicts such as size vs maxsize and copytruncate vs create.
Open Logrotate Config Generator on AltFTool — it loads instantly in your browser.
Provide your input — an image, text, or data.
Let the tool analyze or generate the result.
Review, refine, and reuse the output wherever you need it.
Emits directives exactly as logrotate(8) defines them, ready for /etc/logrotate.d/.
Explains that size overrides the schedule, create is ignored under copytruncate, and delaycompress needs compress.
Wraps your reload command in sharedscripts + postrotate/endscript so it runs once per pattern.
size rotates ONLY on file size and makes logrotate ignore the daily/weekly/monthly schedule entirely, while maxsize rotates when either the size is exceeded or the scheduled time arrives — whichever happens first. For "daily, but sooner if it hits 100M", use maxsize 100M with daily.
Prefer create plus a postrotate signal (for example systemctl reload nginx) when the daemon can reopen its log file. copytruncate copies the log and truncates the original in place, so any lines written between the copy and the truncate are permanently lost — it exists for programs that keep a file handle open forever and cannot be signalled.
It keeps 14 rotated copies before deleting the oldest, so with daily rotation you retain roughly two weeks of history. rotate 0 keeps nothing — the old log is deleted immediately at rotation.
delaycompress postpones compression by one rotation cycle, leaving the most recent rotated file uncompressed. That matters when a daemon may keep writing briefly to the old file after rotation — compressing it immediately would corrupt those final writes. It only works together with the compress directive.