Log files deleted/permissions changed @ reboot

I wanted a couple extra files in /var/log/asterisk however on reboot the files I create are deleted. Also, the permissions are changed for the connectlog file that’s there with the standard install.

I looked around in /usr/lib/tmpfiles.d and the only file I see that had /var/log was systems.conf. I deleted those lines and it did not change the behavior on reboot. (debian trixie asl3)

Any thoughts?

Thanks,

WY7WL

I assume you're talking about an ASL3 Pi Appliance image? The log partitions are all "ramdisk" partitions using the tmpfs filesystem. On reboot, the contents are wiped out. This is by design to avoid unnecessary wear on SD cards.

I am yes. pi4b raspberry asl3 trixie.

So, can that be changed or no?

I could just move my log files. Might be easier.

There isn't an "on/off" option for that. It's a design goal of the appliance image. If you know enough about Linux, you can stop the processes, umount the tmpfs partitions, remove them from /etc/fstab, and reboot. That should change logging to go back to the SD card. Keep in mind that's an exponentially higher write rate hitting your SD card.

Thanks for the info. That’s above my level for sure. I’ll just work around it for now.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.