Direkt zum Inhalt
Linux Debian, Begrenzung der Größe von Protokolldateien, Beispiel: syslog

Diese Datei bearbeiten: /etc/logrotate.d/rsyslog

sudo nano /etc/logrotate.d/rsyslog

So einstellen:

/var/log/syslog
/var/log/mail.log
/var/log/kern.log
/var/log/auth.log
/var/log/user.log
/var/log/cron.log
{
	rotate 7
	size 200M
	missingok
	notifempty
	compress
	delaycompress
	sharedscripts
	postrotate
		/usr/lib/rsyslog/rsyslog-rotate
	endscript
}

Die Einträge: /var/log/* stehen für alle Dateien, die betroffen sind.

Anschließend neu starten:

sudo systemctl restart rsyslog

Testen Sie anschließend Ihre Konfiguration:

sudo logrotate -v /etc/logrotate.conf

 

Profile picture for user admin Stephane K

Écrit le

Il y'a 1 Jahr
Modifié
Il y'a 2 Wochen
Lädt...
WhatsApp
Support Habeuk : +237 694 900 622
WhatsApp Send