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
RamLog option #2 & location of persistent logs
Re: RamLog option #2 & location of persistent logs
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.
Not sure currently about systemd. Check out /etc/systemd/journald.conf (or similar) where all available settings are listed.
Re: RamLog option #2 & location of persistent logs
thanks for the reply.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.
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.
Re: RamLog option #2 & location of persistent logs
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
Re: RamLog option #2 & location of persistent logs
that worked!!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
thank you!