Linux logrotate Validator & 30-Day Dry-Run Simulator (logrotate -d)
Catch silent /etc/logrotate.d/* bugs before your server disk hits 100% at 3 AM. Detects create vs. copytruncate conflicts, missing su permission failures, unclosed postrotate scripts, and simulates exact rotated filenames and peak disk usage 100% locally in your browser.
logrotate -d)| Log Target | Active / Rotated Files Kept on Disk | Disk Used | Schedule / Trigger |
|---|
Validate /etc/logrotate.d/ Configs Before Disk Space Runs Out
Logrotate fails silently more often than almost any other Linux daemon. A missing su www-data adm line causes logrotate to skip the entire file due to "insecure directory permissions," while combining size 100M with daily ignores the schedule, and forgetting delaycompress corrupts active rotated logs while Nginx or PostgreSQL reloads.
This browser-local simulator parses real logrotate config blocks, validates scriptlets (prerotate / postrotate / endscript), flags production conflicts, and models how many files and megabytes will sit on disk after 30 days of growth.
Browser Simulator vs. logrotate -d CLI
| Criteria | QuickCoderHub (In-Browser) | Linux logrotate -d CLI |
|---|---|---|
| Multi-Day Disk Forecast | Models 30–365 days of MB/day growth + gzip compression | Only evaluates a single instant against current file sizes |
| Conflict & Best-Practice Audit | Catches create+copytruncate, missing delaycompress, missing missingok | Only prints terse parser warnings |
| Zero Server Access Needed | Draft & review PR configs on macOS/Windows laptops | Requires live Linux server with matching log directories |
| Privacy | 100% client-side; internal file paths stay in browser RAM | Local server |
Frequently Asked Questions
Why did logrotate skip my log with "parent directory has insecure permissions"?
If /var/log/myapp is writable by a non-root user, logrotate refuses to rotate it as root unless you add su appuser appgroup inside the config block.
What is the difference between size, minsize, and maxsize?
size replaces the time interval (daily/weekly) completely. minsize requires both the time interval AND minimum size to be met. maxsize rotates when the time interval passes OR earlier if the file exceeds the cap—making daily + maxsize 500M the safest combo for spiky traffic.
How do I test my config live on Linux without rotating real files?
Run sudo logrotate -d /etc/logrotate.d/yourapp. The -d (debug) flag prints every decision logrotate would take without renaming, compressing, or deleting anything.
Why does sharedscripts matter when using wildcards like /var/log/nginx/*.log?
Without sharedscripts, logrotate executes your postrotate reload command once for every matched log file (reloading Nginx 10 times for 10 vhost logs). Adding sharedscripts runs postrotate exactly once per rotation batch.