[systemd-devel] [question] is it possible with systemd-journalctl to change the location to save logs in other location?

Lennart Poettering lennart at poettering.net
Sun Aug 16 17:00:06 UTC 2020


On So, 16.08.20 16:35, ionut n (ionut_n2001 at yahoo.com) wrote:

>
> Hi SystemD Team,
>
> One question.
>
> Is it possible with systemd-journalctl to change the location to save logs in other location?
>
> My system is volatile (tmpfs) and I have another location available to keep certain logs.
>
>    - /dev/root or / is tmpfs
>    - /external-persistent0 is ext4 or xfs
>
> I would like to save the logs here:
> /external-persistent0/journal
>
> Is it possible to do this?
> In the current documentation for journalctl I have not seen anything about this.
> Thank you and have a good day to the whole team.

Use bind mounts or symlinks.

In systemd we think it's important that the same resources are
available under the same path as much as possible. Where that path
ultimately points to (by means of symlinks or bind mounts) doesn't
matter to us much, we just think it's much simpler if the paths stay
fixed and are useful universal identifiers, even if the stuff behind
them is actually placed somehere else.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list