
以下のスクリプトを確認してください。このスクリプトでは、ファイルを 30 日間ローテーションし、ローテーション後にバックアップ ディレクトリに移動する必要があります。rotate 30 と maxage 30 を使用したので、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
}
これについて助けてください。ありがとうございます。