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

Tomasz Torcz tomek at pipebreaker.pl
Sun Aug 16 16:48:38 UTC 2020


On Sun, Aug 16, 2020 at 04:35:48PM +0000, ionut n wrote:
> 
> Hi SystemD Team,

  It's "systemd" (all lowercase).

> 
> 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.

  Journal stores persistent logs in /var/log/journal, so best course of
action would be to mount --bind /external-persistent0/journal /var/log/journal
A symlink from /var/log/journal to /external-persistent0/journal may
work, too.

-- 
Tomasz Torcz                        To co nierealne – tutaj jest normalne.
tomek at pipebreaker.pl              Ziomale na życie mają tu patenty specjalne.



More information about the systemd-devel mailing list