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.

/etc/logrotate.d/ CONFIGURATION0 blocks
DIRECTIVE AUDIT & DISK FOOTPRINTReady
Errors
0
Warnings
0
Peak Disk
0 MB
Retained Files
0
DRY-RUN FILESYSTEM SNAPSHOT AT END OF SIMULATION (logrotate -d)
Log TargetActive / Rotated Files Kept on DiskDisk UsedSchedule / 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

CriteriaQuickCoderHub (In-Browser)Linux logrotate -d CLI
Multi-Day Disk ForecastModels 30–365 days of MB/day growth + gzip compressionOnly evaluates a single instant against current file sizes
Conflict & Best-Practice AuditCatches create+copytruncate, missing delaycompress, missing missingokOnly prints terse parser warnings
Zero Server Access NeededDraft & review PR configs on macOS/Windows laptopsRequires live Linux server with matching log directories
Privacy100% client-side; internal file paths stay in browser RAMLocal 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.

Related Linux Operations Tools