Why I Built My Own “Time Machine” for Linux: Introducing Home-Backup

Written by

in

In the world of Linux, we often face a choice: use a heavy, bloated GUI backup tool that feels like a black box, or use a basic cp command that is slow and inefficient.

After losing data to a failing hard drive—a victim of the silent killer known as Bit Rot—I decided to build something better. Today, I’m releasing v1.1.4 of my Home Folder Backup Utility. It’s modular, fast, and, most importantly, bulletproof.

The Challenge: Speed vs. Security

Most backup scripts just copy files. If you have 200GB of data, you need 200GB of space every single time. That’s not sustainable. I wanted a solution that offered:

  1. Incremental Efficiency: Only save what changed.
  2. Integrity: Ensure the files haven’t corrupted over time.
  3. Portability: Work as well on a USB stick as it does on a server.

1. True Incrementalism via Hard Links

The “magic” behind this tool is the --link-dest flag in rsync. Instead of duplicating files that haven’t changed, the script creates a Hard Link to the previous backup.

To the user, every backup looks like a full 200GB folder. But on the disk? It only takes up a few megabytes of new data. You get a “Time Machine” style history without buying a massive server.

2. Fighting the “Silent Killer”: Bit Rot

Standard backups check file size and date. But what if the size is the same, but a single bit of data flipped on your hard drive? Your backup is now corrupted, and you don’t even know it.

In v1.1.4, I introduced Verification Mode.

By using the --verify flag, the script calculates a unique checksum (DNA) for every file. If even a single “0” has turned into a “1,” the script detects it and fixes the backup. It’s the ultimate peace of mind for long-term storage.

3. A Modular “Swiss Army Knife” Architecture

I didn’t want a “spaghetti code” script. I split the utility into three parts:

  • The Engine (.functions): Handles the core rsync logic and path detection.
  • The Modules (.modules): Adds “pro” features like GPG Encryption, Network Mounting, and Auto-Eject for USB drives.
  • The UI (.sh): A beautiful, gum-powered terminal interface that makes it feel like a modern app.

4. The 3-2-1 Strategy

With the inclusion of the Encryption and Network modules, this script now follows the gold standard of data safety:

  • 3 copies of your data.
  • 2 different types of media (Local SSD + External HDD).
  • 1 off-site copy (Encrypted and ready for the cloud).

Conclusion

Backups shouldn’t be a chore. They should be a silent, invisible safety net. With v1.1.4, I’ve combined the speed of incremental snapshots with the security of checksum verification.

Check out the code on GitHub and start protecting your digital life today.

☕ Support the Project

Donate with PayPal