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

Bulk updating user details in Active Directory

Background and use cases If you ever worked in a messy (mismanaged?) AD environment, you know this pain. User accounts with old job titles, outdated phone numbers, duplicated departments such as “Quality” next to “Quality Control”, etc. Maybe even missing these attributes altogether. General havoc in GAL. This is especially true for small and medium sized companies, where the environment is not mature enough to put appropriate procedures in place yet....

August 14, 2022 · 3 min · 462 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