Note: Linux distros run logrotate via /etc/cron.daily/logrotate automatically. If missing, add via crontab before relying on it.
Drop-in file — picked up automatically by the daily cron hook. No service restart needed.
copytruncate chosen because the VTL scripts append with >> and don't trap SIGHUP. Copies the file then truncates the original in place — preserves open file handles.
dateext produces drhmc01backup.log-20260430.gz instead of .1.gz — far easier to grep historically.
-d = debug, no changes made. Read output carefully — confirms both log paths are matched and shows the actions logrotate would take.
-f forces rotation regardless of frequency. Both files should appear in the state file with today's date.
Note: AIX Toolbox builds usually live under /opt/freeware with symlinks into /usr/bin. State file is typically /var/lib/logrotate.status but may be /opt/freeware/var/lib/logrotate.status.
Critical: AIX has no /etc/cron.daily framework. The Toolbox RPM does not always drop a cron hook — verify and add manually if missing or rotation will silently never run.
Same path convention as Linux. Confirm /etc/logrotate.conf contains include /etc/logrotate.d — Toolbox default does, but worth checking.
copytruncate mandatory here — AIX ksh holds the log open via >> and won't reopen on rotation. create-style rotation would break logging until the VTL script restarts.
If using create instead — use group system, not root: create 0640 root system.
copytruncate is preferred for VTL script logs on both platforms — VTL scripts append via >> and don't trap SIGHUP, so create-style rotation breaks logging until the script restarts./etc/cron.daily — verify a logrotate cron entry exists in root's crontab. The Toolbox RPM does not always install one.create instead of copytruncate, use group system not root: create 0640 root system.delaycompress skips compressing the most recent rotation — avoids gzipping a file a process may still be writing to.dateext produces drhmc01backup.log-20260430.gz rather than .1.gz — far easier for historical greps and audit work.logrotate -d before logrotate -f. Dry run first, force second, never the other way around./var/log/drhmc*backup.log so they are picked up automatically.