[systemd-devel] systemd-journald namespace persistence

Lennart Poettering lennart at poettering.net
Thu Feb 10 11:10:16 UTC 2022


On Mi, 09.02.22 10:18, Roger James (roger at beardandsandals.co.uk) wrote:

> How do I create a persistent systemd-journald namespace?
>
> I have a backup service that is run by a systemd timer. I would like that to
> use it's own namespace. I can create the namespace manually using systemctl
> start systemd-journald at mynamespace.service. However I cannot find a way to
> do that successfully at boot time. I have tried a RequiredBy and a Requires
> in the timer unit but neither seem to work.

Not sure I follow? the journald instance sockets should get
auto-activated as dependency of your backup service, implicitly, as
LogNamespace= side effect. There should be no need to run it all the
time.

The socket units come with StopWhenUnneeded=yes set, so they
automatically go away if no service needs them.

Why would you want to run those services continously?

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list