
請檢查下面的腳本,其中我必須將檔案輪換 30 天,並在輪換後將其移至備份目錄中。因此,由於我使用了rotate 30和maxage 30,當logrotation發生在第31天時,30天前的最舊檔案是否會被刪除..?
/data_gpfs/engageone/active-drive/E-Archive/SystemData/logrotation_test/test.log {
daily
copytruncate
create 775 root wsdepl
dateext
dateformat .%Y.%m.%d
rotate 30
maxage 30
missingok
#notifempty
sharedscripts
postrotate
cd /data_gpfs/engageone/active-drive/E-Archive/SystemData/logrotation_test
gzip test.log.*
mv /data_gpfs/engageone/active-drive/E-Archive/SystemData/logrotation_test/*.gz /data_gpfs/engageone/active-drive/E-Archive/SystemData/logrotation_test/backup
endscript
}
請幫我解決這個問題。謝謝..