Hello,
Dites, je souhaiterai configurer mon logrotate de mysql pour faire une rotation hebdomadaire et garder 15 .log et d'en compresser 15 autres. Donc avoir en tout, 15 fichiers logs mysql, et 15 .log.gz pour avoir un mois de log en tout.
Je bute sur la conf des 15 et 15... Je vois pour ne garder que 15 .log, mais pas pour les 15 .gz...
j'aurai un mysql.conf comme ca :
Citation :
/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log {
weekly
rotate 15
missingok
create 640 mysql adm
compress
sharedscripts
postrotate
test -x /usr/bin/mysqladmin || exit 0
# If this fails, check debian.conf!
MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
if [ -z "`$MYADMIN ping 2>/dev/null`" ]; then
# Really no mysqld or rather a missing debian-sys-maint user?
# If this occurs and is not a error please report a bug.
if ps cax | grep -q mysqld; then
exit 1
fi
else
$MYADMIN flush-logs
fi
endscript
}
|
Merci de votre aide
Message édité par LeKeiser le 25-08-2010 à 16:02:51
---------------
"I intend to live the first half of my life.I don't care about the rest."Errol Flynn."The difference between genius and stupidity is that genius has its limits."Albert Einstein