V
V
vlarkanov2017-08-28 09:53:19
linux
vlarkanov, 2017-08-28 09:53:19

Logrotate: how to store logs for a certain period?

Greetings! Freeswitch-proxy is installed on the machine. It is necessary to store /var/log/freeswitch.log.* files for a week, and /var/log/freeswitch/cdr-csv/* for half a year (without compression), and delete everything that is older.
I didn’t understand how to set up logrotate - there I found how to set a limit on the file size, after which rotation occurs, as well as the frequency of rotation - but I don’t understand how to store logs for a certain period.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chupasaurus, 2017-08-28
@vlarkanov

Option dailyto rotate once every 24 hours, after it rotate N, where N is the number of days to store logs; nocompress - not to compress.
from man logrotate

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question