Frage zu logrotate
Nelson Matias <[email protected]>
| Newsgroups | spline.eisfair.dev |
|---|---|
| Organization | spline |
| Message-ID | <[email protected]> |
Hallo Gruppe, Da ich ja aktuell ein wenig Zeit hatte mich mit dem Eis zu beschäftigen ist mir noch etwas aufgefallen: in der man(8) von logrotate gibt es eine Einstellung für die config-Dateien zu der Endung der rotierten Dateien: dateext Archive old versions of log files adding a daily extension like YYYYMMDD instead of simply adding a number. The extension may be configured using the dateformat option. dateformat format_string Specify the extension for dateext using the notation similar to strftime(3) function. Only %Y %m %d and %s specifiers are allowed. The default value is -%Y%m%d. Note that also the character separating log name from the extension is part of the dateformat string. The system clock must be set past Sep 9th 2001 for %s to work correctly. Note that the datestamps generated by this format must be lexically sortable (i.e., first the year, then the month then the day. e.g., 2001/12/01 is ok, but 01/12/2001 is not, since 01/11/2002 would sort lower while it is later). This is because when using the rotate option, logrotate sorts all rotated filenames to find out which logfiles are older and should be removed. Gruß Nelson Ich habe ein paar logfiles, die ich täglich rotieren lasse und die ich länger als 9 Tage aufhebe. Mich nervt dann immer die Sortierung im Verzeichnis 1, 10, 11, 2, 20, 3, 4, 5, 6, 7, 8, 9. Wäre es möglich dieses dateext global zu setzen? Es existieren ja verschiedene dateien in /etc/logratate.d für die unterschiedlichen Pakete. Ich hab das nicht ganz kapiert ob es dazu eine extra global gültige Konfiguration gibt wo eine solche Einstellung gemacht werden könnte. Wenn ja, kann das evtl. in die Eisfair-Konfigurationsschicht übernommen werden? Gruß Nelson -- Nelson Matias