Sur mon CentOS 6.5,logrotate archive à nouveau les fichiers journaux archivés par date
Deux sites sont en cours d'exécution et je définis le répertoire des journaux séparément. Loglotate fonctionne toutes les semaines mais les résultats ne sont pas bons. il archive de nouveau les archives archivées chaque semaine.
Voici le fichier /etc/logrotate.d/sites.
/home/site1/logs/httpd/* /home/site2/logs/ httpd/* /home/site3/logs/httpd/* {
copytruncate
weekly
rotate 4
missingok
notifempty
dateext
}
et liste de fichiers/home/siate1/logs/httpd
-rw-r--r-- 1 root root 35100863 May 14 17:37 site1-access_log
...
-rw-r--r-- 1 root root 0 Apr 27 03:29 site1-access_log-20140413-20140420
-rw-r--r-- 1 root root 0 May 4 03:24 site1-access_log-20140413-20140420-20140427
-rw-r--r-- 1 root root 0 May 11 03:35 site1-access_log-20140413-20140420-20140427-20140504
-rw-r--r-- 1 root root 70221784 May 11 03:35 site1-access_log-20140413-20140420-20140427-20140504-20140511
-rw-r--r-- 1 root root 0 Apr 27 03:29 site1-access_log-20140420
-rw-r--r-- 1 root root 0 May 4 03:24 site1-access_log-20140420-20140427
-rw-r--r-- 1 root root 0 May 11 03:35 site1-access_log-20140420-20140427-20140504
-rw-r--r-- 1 root root 69335598 May 11 03:35 site1-access_log-20140420-20140427-20140504-20140511
-rw-r--r-- 1 root root 0 May 4 03:24 site1-access_log-20140427
-rw-r--r-- 1 root root 0 May 11 03:35 site1-access_log-20140427-20140504
-rw-r--r-- 1 root root 68505478 May 11 03:35 site1-access_log-20140427-20140504-20140511
-rw-r--r-- 1 root root 0 May 11 03:35 site1-access_log-20140504
-rw-r--r-- 1 root root 68772871 May 11 03:35 site1-access_log-20140504-20140511
-rw-r--r-- 1 root root 68054687 May 11 03:35 site1-access_log-20140511
-rw-r--r-- 1 root root 24701 May 14 16:54 site1-error_log
...
-rw-r--r-- 1 root root 0 Apr 27 03:29 site1-error_log-20140413-20140420
-rw-r--r-- 1 root root 0 May 4 03:24 site1-error_log-20140413-20140420-20140427
-rw-r--r-- 1 root root 0 May 11 03:35 site1-error_log-20140413-20140420-20140427-20140504
-rw-r--r-- 1 root root 109645452 May 11 03:35 site1-error_log-20140413-20140420-20140427-20140504-20140511
-rw-r--r-- 1 root root 0 Apr 27 03:29 site1-error_log-20140420
-rw-r--r-- 1 root root 0 May 4 03:24 site1-error_log-20140420-20140427
-rw-r--r-- 1 root root 0 May 11 03:35 site1-error_log-20140420-20140427-20140504
-rw-r--r-- 1 root root 43345 May 11 03:35 site1-error_log-20140420-20140427-20140504-20140511
-rw-r--r-- 1 root root 0 May 4 03:24 site1-error_log-20140427
-rw-r--r-- 1 root root 0 May 11 03:35 site1-error_log-20140427-20140504
-rw-r--r-- 1 root root 84371 May 11 03:35 site1-error_log-20140427-20140504-20140511
-rw-r--r-- 1 root root 0 May 11 03:35 site1-error_log-20140504
-rw-r--r-- 1 root root 38442 May 11 03:35 site1-error_log-20140504-20140511
-rw-r--r-- 1 root root 31182 May 11 03:35 site1-error_log-20140511
Quel est le problème?
Cette question appartient probablement à serverfault.com. –