Managing LVM snapshots - automated backup script

Some time ago I wrote a simple automation script for taking LVM snapshots, backing them up as disk images, and efficiently compressing in the process. Logical Volume Manager is often overlooked solution in this regard, providing much needed flexibility as a bitwise backup strategy. Key word here being bitwise - exact bit by bit replica. This is exclusively how I backup my systems nowadays. It’s so much smoother than offline disk cloning (Clonezilla etc....

September 9, 2022 · 1 min · 178 words · Lukasz

Setting up mail client for automated alerts on a server

Here’s a quick way to setup SMTP client for emailing logs, reports and errors from a server. This is especially useful for unattended-upgrades or watchtower (for updating Docker containers). I’m using msmtp, which has fairly good support for sendmail and thus integrates well with many applications using native mail in Linux. Install msmtp and msmtp-mta: sudo apt install msmtp msmtp-mta The latter provides alias for sendmail Copy example system-wide configuration file (provided with the package): sudo cp /usr/share/doc/msmtp/examples/msmtprc-system....

August 21, 2022 · 2 min · 221 words · Lukasz

Beep at startup on a Linux system

Let’s say you need to reboot a headless system running Linux. How do you check when it’s back online, and IF it’s back online? You can start pinging it, sure, but what if you are right next to it in the same room? Is there a better way to get instantly notified when your system is back up? Sure there is! Make it beep at you when it’s ready 😄. We will use a piezoelectric speaker, aka....

August 13, 2022 · 2 min · 405 words · Lukasz