RamLog option #2 & location of persistent logs

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
FESyv
Posts: 12
Joined: Sat May 04, 2019 11:13 pm

RamLog option #2 & location of persistent logs

Post by FESyv »

where can i config "ramlog #2" to write logs to a mounted usb stick so i can have persistent logs written there instead of default ~/logfile_storage?

also i read where systemd-journal daemon will write to /var/log/journal if i create that dir. where can i config systemd-journal to store logs to mounted usb stick and not /var/log/journal ?

tia
User avatar
MichaIng
Site Admin
Posts: 2294
Joined: Sat Nov 18, 2017 6:21 pm

Re: RamLog option #2 & location of persistent logs

Post by MichaIng »

You can generally solve it by placing symlinks to the default log locations pointing to the external drive. Just be sure to copy existing logs via cp -a, so permissions and pre-created dirs are preserved.

Not sure currently about systemd. Check out /etc/systemd/journald.conf (or similar) where all available settings are listed.
FESyv
Posts: 12
Joined: Sat May 04, 2019 11:13 pm

Re: RamLog option #2 & location of persistent logs

Post by FESyv »

MichaIng wrote: Tue Nov 26, 2019 6:26 pm You can generally solve it by placing symlinks to the default log locations pointing to the external drive. Just be sure to copy existing logs via cp -a, so permissions and pre-created dirs are preserved.

Not sure currently about systemd. Check out /etc/systemd/journald.conf (or similar) where all available settings are listed.
thanks for the reply.

well, i tried symlinking /root/logfile_storage/ to /mnt/usb1/root.

i thought 'ln -s' would create the "logfile_storage" dir in /mnt/usb1/root/ but i couldn't get it to work. symlinks work with dir's, yes? /mnt/usb1/ is formatted as ext4. i'll try again later today.
User avatar
MichaIng
Site Admin
Posts: 2294
Joined: Sat Nov 18, 2017 6:21 pm

Re: RamLog option #2 & location of persistent logs

Post by MichaIng »

The following should work, based in initial setup:

Code: Select all

mkdir /mnt/usb1/root
mv /root/logfile_storage /mnt/usb1/root/
ln -s /mnt/usb1/root/logfile_storage /root/logfile_storage
FESyv
Posts: 12
Joined: Sat May 04, 2019 11:13 pm

Re: RamLog option #2 & location of persistent logs

Post by FESyv »

MichaIng wrote: Wed Nov 27, 2019 2:57 pm The following should work, based in initial setup:

Code: Select all

mkdir /mnt/usb1/root
mv /root/logfile_storage /mnt/usb1/root/
ln -s /mnt/usb1/root/logfile_storage /root/logfile_storage
that worked!!

thank you!
Post Reply