DEV Community

GitHubOpenSource
GitHubOpenSource

Posted on

Borgmatic: The Simple, Configuration-Driven Guardian for Your Server Backups

Quick Summary: ๐Ÿ“

borgmatic is a configuration-driven backup software designed for servers and workstations. It leverages Borg Backup to provide client-side encryption, database backups, and monitoring through third-party integrations, simplifying the backup process with a focus on automation and ease of use.

Key Takeaways: ๐Ÿ’ก

  • โœ… Simplifies complex Borg Backup operations using a single, readable YAML configuration file.

  • โœ… Provides automatic, secure client-side encryption and efficient data deduplication across all backups.

  • โœ… Seamlessly backs up live databases (PostgreSQL, MySQL, MongoDB) alongside standard filesystem data.

  • โœ… Automates detailed retention policies (daily, weekly, monthly) and includes integrated health monitoring checks (e.g., Healthchecks.io).

Project Statistics: ๐Ÿ“Š

  • โญ Stars: 2092
  • ๐Ÿด Forks: 107
  • โ— Open Issues: 0

Tech Stack: ๐Ÿ’ป

  • โœ… Python

Managing server backups often feels like navigating a minefield of complex scripts and manual checks. Thatโ€™s where borgmatic shines. It acts as a friendly, powerful wrapper around the incredibly robust Borg Backup tool, transforming complex backup procedures into a single, straightforward configuration file. Instead of spending hours writing custom shell scripts to manage retention, encryption, and multiple data sources, you define everything once in a clean YAML file, and borgmatic handles the orchestration automatically.

The core magic of borgmatic lies in its simplicity. You list your source directories
โ€”like /home or /etc
โ€”and then define your repositories, which can be local paths or secure remote locations via SSH, including specialized services like BorgBase. The beauty is that borgmatic leverages Borg Backupโ€™s superior capabilities, meaning your data is automatically deduplicated across backups, saving massive amounts of storage space, and itโ€™s secured with mandatory client-side encryption. This means your sensitive data is protected before it ever leaves your machine, providing robust security right out of the box.

Beyond static files, borgmatic is a lifesaver for applications requiring live data snapshots. It integrates seamlessly with popular databases like PostgreSQL, MySQL, MariaDB, and MongoDB. You simply specify the database name in the configuration, and borgmatic automatically handles the necessary steps
โ€”dumping the database contents safely before the backup runs
โ€”ensuring you capture a consistent, application-aware snapshot. This eliminates the headache of manually stopping services or running pre-backup scripts for dynamic data.

Retention policy management, which is notoriously tricky to script correctly, becomes trivial. Need to keep the last 7 daily, 4 weekly, and 6 monthly archives? Just set those three numbers in the configuration, and borgmatic automatically prunes old backups according to your rules, ensuring you comply with data retention needs without filling up your storage. Furthermore, it incorporates crucial health monitoring. By integrating with services like Healthchecks.io or Uptime Kuma, you can configure borgmatic to ping a monitoring service upon success or failure. If a backup skips a scheduled run, you get an immediate alert, ensuring you aren't left with stale or broken archives when disaster strikes. This level of automation and validation is what transforms a tedious chore into a reliable, set-it-and-forget-it system. For developers running personal servers, small business infrastructure, or managing workstations, borgmatic is the essential tool for achieving peace of mind regarding data persistence.

Learn More: ๐Ÿ”—

View the Project on GitHub


๐ŸŒŸ Stay Connected with GitHub Open Source!

๐Ÿ“ฑ Join us on Telegram

Get daily updates on the best open-source projects

GitHub Open Source

๐Ÿ‘ฅ Follow us on Facebook

Connect with our community and never miss a discovery

GitHub Open Source

Top comments (0)