[plug] How to retain logrotate backups forever

Onno Benschop onno at itmaze.com.au
Fri Dec 29 21:28:36 AWST 2023


Fingers crossed that logrotate still works on the OS that your descendents
are using then.

Remember to set up a cron job to send an alert so that they don't get a
rude surprise when today's log unexpectedly gets deleted.

Perhaps add a comment to your will about today's log being erased on a
particular date, just to be sure.

You could of course just set up a cron job to move the logs somewhere else
and perhaps give them an appropriate name - say their ISO date with the
name of the log.

O
--
finger painting on glass is an inexact art - apologies for any errors in
this scra^Hibble

()/)/)() ..ASCII for Onno..

On Fri, 29 Dec 2023, 19:16 Chris McCormick, <chris at mccormick.cx> wrote:

> Hi Byron,
>
> Thanks, I ended up doing this and set it to 100 years of backups.
>
> Cheers,
>
> Chris.
>
>
> On 29/12/23 1:57 pm, Byron Hammond wrote:
> > Can you bump up the rotate number to something massive so it effectively
> > isn't deleted for a very very long time?
> >
> > On Fri, 29 Dec 2023 at 09:22, Chris McCormick <chris at mccormick.cx
> > <mailto:chris at mccormick.cx>> wrote:
> >
> >     Hi all,
> >
> >     Does anybody know how to cause logrotate to retain the rotated logs
> >     forever? The man page for `rotate` says this:
> >
> >
> >       > rotate count
> >       >     Log files are rotated count times before being removed or
> >     mailed
> >     to the address specified in a mail directive. If count is 0, old
> >     versions are removed rather than rotated.
> >
> >
> >     It doesn't say what happens if this option is omitted entirely. I
> asked
> >     ChatGPT and it lied to me with a catastrophic answer which would
> delete
> >     everything. I can't find an answer on the usual sites like
> >     Stackoverflow. Hoping for a response an actual human who has done
> this
> >     before.
> >
> >     Thanks very much!
> >
> >
> >     Chris.
> >
> >     --
> >     https://mccormick.cx/
> >     _______________________________________________
> >     PLUG discussion list: plug at plug.org.au <mailto:plug at plug.org.au>
> >     http://lists.plug.org.au/mailman/listinfo/plug
> >     Committee e-mail: committee at plug.org.au <mailto:
> committee at plug.org.au>
> >     PLUG Membership: http://www.plug.org.au/membership
> >
>
> --
> https://mccormick.cx/
> _______________________________________________
> PLUG discussion list: plug at plug.org.au
> http://lists.plug.org.au/mailman/listinfo/plug
> Committee e-mail: committee at plug.org.au
> PLUG Membership: http://www.plug.org.au/membership
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20231229/2ed9b109/attachment.html>


More information about the plug mailing list