I am working with a Raspberry Pi Zero W and Raspbian OS and use the log file syslog which is located in /var/log/syslog/ to track specific events. My problem is, that the syslogfile is overwritten after some time (after about 1 day in my case). How can I configure the syslog file to keep the data for a specific time. Like for 1 month or so? Is that possible?

  • Configure logrotate. – Ipor Sircer Dec 7 '17 at 16:27
  • @IporSircer Could you please provide a minimal example how to set up a maximum size for the syslog file before a new one is created? That would help me really a lot. – Samuel Dec 7 '17 at 16:32
  • man logrotate – Ipor Sircer Dec 7 '17 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.