[squid-users] Logrotate question

Antony Stone Antony.Stone at squid.open.source.it
Thu Jun 16 10:41:10 UTC 2022


On Thursday 16 June 2022 at 11:26:37, robert k Wild wrote:

> Cool, so I will rotate daily and delete after 91 days, thanks guys

Why did you change the recommended 92 days into 91?

Consider June, July and August:

	June has 30 days
	July has 31 days
	August has 31 days

So, on September 1st, June 1st is 92 days ago, and you can delete the logs for 
May 31st, which are older than 92 days.

If you deleted older than 91 days, you would be deleting June 1st on September 
1st, and one day this might be significant to someone.


Antony.

> On Thu, 16 Jun 2022, 11:14 Matus UHLAR - fantomas wrote:
> > On 16.06.22 10:54, robert k Wild wrote:
> > >Basically I want to keep logs for 3 months then rotate so it overwrites
> > >them with another 3 months, if that makes sense
> > 
> > in fact, it does not.
> > 
> > I guess you are supposed to keep 3 months of logs, which mean, you always
> > need to have 3 months of logs available.
> > 
> > Each day, you can delete log files over 3 months old.
> > 
> > If you rotated lof once in 3 months, you would have single file with 3
> > months of logs in it, and could remove it 3 months after rotating, when
> > first logs would be 6 months old.
> > 
> > As we already told you, rotate daily and remove old logs after 92 days.
> > and use logrotate config.

-- 
I just got a new mobile phone, and I called it Titanic.  It's already syncing.

                                                   Please reply to the list;
                                                         please *don't* CC me.


More information about the squid-users mailing list