Pihole - Move Query Logging to RAM – Protects SD Card

Move Query Logging to RAM – Protects SD Card

Extensive writing can damage SD card. For this reason, I suggested turning off query logging. But what if you want to leave it on? A good option, in this case, is to move your logs to RAM instead of SD card. So all your logs on Raspbian Lite will be written to RAM instead of SD card, thereby prolonging the life of SD card.

Log2Ram

Like ramlog for systemd (on debian 8 jessie for example).
Usefull for RaspberryPi for not writing on the SD card all the time. You need it because your SD card doesn't want to suffer anymore!
Explanations: The script creates a /var/log mount point in RAM. So any writing of the log to the /var/log folder will not actually be written to disk (in this case to the sd card for a raspberry card) but directly to RAM. By default, every hour, the CRON will launch a synchronization of the RAM to the folder located on the physical disk. The script will also make this copy of RAM to disk in case of machine shutdown (but cannot do it in case of power failure). This way you avoid excessive writing on the SD card.

https://github.com/azlux/log2ram

Comments

Popular posts from this blog

Extracting and using a modified VMWare Player BIOS or UEFI firmware

Activate Synology Active Backup for Business for DSM 6

Windows 11 internet/account bypass