Answer the question
In order to leave comments, you need to log in
LOGROTATE - not writing to a new file?
Good afternoon.
Faced here with such problem. There is a log file in which any infa is thrown off, type >> logfile.log. And there is logrotate, which was supposed to rotate this file. But he copies this log to a new one, with a date already, like logfile.log-2021-06-30, that original file (logfile.log) is reset to zero, and the data continues to be collected not from scratch in that original file, but in that has been copied.
If the service is running, as I understand it, you need to restart the services, if by the way it is http, etc., and the file starts recording from scratch. And if the record goes to my file not from any dib service. but just the output of some commands, the output of information is simple, with the redirection ">>" to this file, then there is nothing to reload.
How to solve the problem? Something to do with file descriptors, sort of, right? Tell me please.
Thank you.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question