Hallo,
ich habe hier ein Debian Etch Fileserver aufgesetzt und habe das Logverzeichnis auf ein tmpfs gelegt, da ich so vermeide dass die Festplatte andauernd Zugriffe macht.
Jetzt würde ich trotzdem gerne, falls der logrotate Deamon aktiv wird, die Daten auf ein physikalisch existierendes Verzeichnis speichern.
Gibs da ne Idee? Der olddir Parameter funktioniert ja leider nicht da es nicht dasselbe Laufwerk ist...
Vielen Dank schonmal
Logrotate und Dateien Verschieben
-
- Project Manager
- Posts: 11190
- Joined: 2003-02-27 01:00
- Location: Hamburg
Re: Logrotate und Dateien Verschieben
olddir plus mount --bind sollte funktionieren.
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
-
- Posts: 747
- Joined: 2003-03-17 15:32
Re: Logrotate und Dateien Verschieben
hmm, wenn ich ehrlich bin kapier ich nicht wie es den Unterschied machen soll...
folgendes hab ich probiert:
/var/logrotate (auf sda1)
/var/log (tmpfs)
In der Logrotate-Config:
und es kommt
folgendes hab ich probiert:
/var/logrotate (auf sda1)
/var/log (tmpfs)
Code: Select all
mount -o bind /var/logrotate /var/log/logrotate
Code: Select all
olddir /var/log/logrotate
Code: Select all
reading config info for /var/log/apache2/*.log
olddir is now /var/log/logrotate/apache2
error: apache2:16 olddir /var/log/logrotate/apache2 and log file /var/log/apache2/error.log are on different devices
-
- Project Manager
- Posts: 11190
- Joined: 2003-02-27 01:00
- Location: Hamburg
Re: Logrotate und Dateien Verschieben
OK, hätte ja klappen können :(
Wozu benötigst Du eigentlich (unvollständige) Backups von flüchtigen Daten? Wichtige nicht-statische Daten gehören nicht auf tmpfs oder Ramdisks...
Wozu benötigst Du eigentlich (unvollständige) Backups von flüchtigen Daten? Wichtige nicht-statische Daten gehören nicht auf tmpfs oder Ramdisks...
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
-
- Posts: 747
- Joined: 2003-03-17 15:32
Re: Logrotate und Dateien Verschieben
ja, das stimmt schon - aber es ist die einzige Möglichkeit dass ich nicht ständig Festplattenzugriffe habe....
ich werd dann einfach die rotierten Files wegkopieren....
ich werd dann einfach die rotierten Files wegkopieren....