Taming Dependency Hell with apt-mark and Pinning on Debian-Based Systems

Introduction to Dependency Hell

I’ve been there - stuck in dependency hell, trying to figure out why a package won’t install or update. It’s frustrating, especially when you’re just trying to get some work done. On Debian-based systems like Ubuntu, tools like apt-mark and pinning can be lifesavers. In this article, I’ll walk you through how to use these tools to manage dependencies and keep your system running smoothly.

Understanding apt-mark

apt-mark is a command-line tool that lets you mark packages as automatically or manually installed. This is super useful for preventing unwanted package removals or upgrades. For example, if you’ve installed a package manually, you can mark it as manually installed using the following command:

[Read More]

Dealing with Disk Space Emergencies on Small Linux Servers

Dealing with Disk Space Emergencies

I’ve seen this go wrong when you least expect it - a small Linux server, whether in a homelab or for self-hosting, suddenly runs out of disk space. This can happen due to misconfigured log rotation, unexpected data growth, or simply underestimating storage needs. When it does, acting quickly and making informed decisions is crucial to prevent data loss and service downtime.

Identifying the Issue

The real trick is to identify the cause of the issue quickly. I usually start with df -h to get an overview of the disk space usage, or du -sh /path/to/directory to check the size of specific directories. For a more detailed analysis, tools like ncdu are invaluable - they provide an interactive way to browse through the directory tree and identify large files or directories. This is where people usually get burned, not realizing that a single large file or directory is consuming all their disk space.

[Read More]

Recovering from a Failed Borg Backup Repository: Lessons from a Homelab Mishap

Introduction to Borg Backup

I’ve been using Borg Backup for years, and it’s been a reliable tool in my homelab setup. However, like any complex system, it’s not perfect, and I recently had to deal with a failed repository. This experience taught me a lot about the recovery process, and I’d like to share my findings with you.

Understanding Borg Backup Repositories

Before we dive into recovery, it’s crucial to understand how Borg Backup repositories work. A repository is essentially a storage location for your backups, and it can be hosted locally or remotely. Borg uses archives to store individual backups within the repository, and each archive contains a snapshot of your data at a particular point in time. I’ve seen this go wrong when the repository becomes inconsistent, so it’s essential to understand the basics.

[Read More]

Taming Disk Space Consumption on My Home Server with Quarterly rsync Snapshots and a Dash of Log Rotation

Introduction to Disk Space Management

I’ve learned the hard way that managing disk space is crucial for a healthy and efficient home server. It’s easy to let disk space consumption get out of hand, especially with the amount of data we generate these days. I’ve seen this go wrong when I didn’t keep a close eye on my server’s disk usage - it was growing at an alarming rate. To get back on track, I’ve implemented a quarterly rsync snapshot and log rotation strategy. The real trick is to find a balance between keeping enough data for backups and not letting logs consume too much disk space.

[Read More]

Recovering from a Failed Btrfs Send Receive Operation with Rsync as a Safety Net

Introduction to Btrfs Send and Receive

I’ve been working with Btrfs for a while now, and I have to say, its send and receive functionality is one of my favorite features. It makes efficient backups and data replication across systems a breeze. However, like any complex operation, things can go wrong, and you’re left with incomplete or corrupted data. That’s where having a safety net like rsync comes in handy.

[Read More]

Taming Disk Space Usage on My Homelab Server with btrfs Snapshots and Quotas

Introduction to Disk Space Management

I’ve been running a homelab server for a while now, and one thing that’s always been a challenge is managing disk space. With multiple services and projects running on my server, it’s easy to lose track of disk usage. I’ve seen this go wrong when you’re not paying attention, and suddenly you’re scrambling to free up space. Recently, I started exploring ways to better manage my disk space, and I stumbled upon btrfs snapshots and quotas. In practice, these features have been a game-changer for me.

[Read More]

Taming Disk Space Hogs with btrfs Snapshots and Automatic Pruning

Introduction to btrfs Snapshots

I’ve been running Linux for years, and one thing I’ve learned is the importance of managing disk space effectively. btrfs has been a game-changer for me - its snapshotting and automatic pruning features have saved me from more than a few headaches. In this article, I’ll share my experience with using btrfs snapshots to keep my systems running smoothly.

What are btrfs Snapshots?

btrfs snapshots are essentially temporary copies of a subvolume, which can be used to roll back changes or recover data if something goes wrong. I’ve seen this go wrong when I’ve accidentally overwritten important files or filled up my disk with unnecessary data. With btrfs snapshots, you can create a snapshot of your system, make changes, and then delete the snapshot if everything works out. The real trick is to use them consistently and make them a part of your workflow.

[Read More]

Taming the Beast: Getting borg Backup to Respect My Limited Laptop Disk Space

Introduction to Borg Backup

I’ve been on the hunt for a reliable backup solution that can handle my laptop’s limited disk space for ages. When I stumbled upon Borg Backup in 2025, I thought I’d finally found the answer. This deduplicating backup program has been a game-changer, but I soon realized that its default settings weren’t exactly optimized for my laptop’s storage constraints. So, I set out to tame the beast and get Borg Backup to respect my laptop’s limited disk space.

[Read More]

Taming Background Tasks with Nohup and Systemd: A Homelab Lesson Learned

Introduction to Background Tasks

As someone who’s spent years running a homelab, I’ve found that managing background tasks is crucial. These tasks need to keep running even after I’ve logged out of my system, and they’re essential for things like backups, system monitoring, and maintenance scripts. I used to rely on screen and tmux to keep these tasks running, but I’ve recently switched to using nohup and systemd. In this article, I’ll share my experience with these tools and provide some practical examples.

[Read More]

Taming rsync: My Backup Scripts and the Quest for Consistent Snapshot Rotation

Introduction to Backup Scripts

I’ve been running my own homelab for years, and I’ve learned the hard way that a solid backup strategy is crucial. After trying out various backup tools in 2025, I kept coming back to rsync due to its flexibility and reliability. This year, I’ve been focused on fine-tuning my backup scripts to achieve consistent snapshot rotation. Don’t bother with overly complex backup solutions - rsync is a powerful tool that can get the job done.

[Read More]