6: Borgmatic - Backup System (optional, but you should have backup)

Borgmatic is an automated backup system that keeps your data safe by creating encrypted, compressed backups of all your applications and databases. It's like having a digital safety net that automatically saves copies of everything important. For comprehensive configuration options and advanced features, please refer to the official Borgmatic documentation.

What is Borgmatic? (Simple Explanation)

Borgmatic is like a smart, automated filing system that makes copies of all your important data. Think of it as having a personal assistant who:

Why Borgmatic is essential:

Think of it like this: If your server was a house, Borgmatic would be like having a professional photographer who takes a complete photo of every room every day, stores the photos safely, and can help you rebuild the house exactly as it was if something happens.

Interdependencies

Required: Borgmatic uses Apprise for notifications (success/failure/security alerts). Install Apprise first via 📱 APPLICATIONS → Apprise → Install.

Prerequisites

Before installing Borgmatic, make sure you have:

Why These Prerequisites Matter

Infinity Tools: Provides the management interface for Borgmatic

Docker: Runs Borgmatic in a secure container

Traefik: Provides secure access to backup management

Storage space: Backups need somewhere to be stored

Step 1: Start Infinity Tools

Make sure you're connected to your server via SSH, then start Infinity Tools:

sudo infinity-tools

Using the Infinity Tools GUI

When you start Infinity Tools, you'll see the main menu. Look for the 💾 BACKUP MANAGEMENT section - this is where Borgmatic is located.

Step 2: Navigate to Borgmatic

In the Infinity Tools menu:

  1. Use your arrow keys to navigate to 💾 BACKUP MANAGEMENT
  2. Press Enter to open the Backup Management menu
  3. Look for Borgmatic in the list
  4. Select it and press Enter

Understanding the Backup Management Section

The Backup Management section contains tools for protecting your data:

Look for the turquoise cursor - it shows what you're about to select!

Step 3: Install Borgmatic

When you select Borgmatic, you'll see installation options. Choose Install Borgmatic.

What Happens During Installation

Borgmatic installation will:

This usually takes 3-5 minutes.

Step 4: Configure Borgmatic

During installation, you'll be asked several questions:

Backup Schedule

You'll see a prompt like:

📅 Backup Schedule Configuration
=============================
How often should files be backed up?

1) Daily (default) - Once per day at 2:00 AM
2) Twice daily - Every 12 hours
3) Weekly - Once per week on Sunday

For beginners: Choose "1" (Daily) - This provides good protection without using too much storage.

Retention Policy

You'll be asked how long to keep backups:

📦 Retention Policy
================
How long should backups be kept?

1) Conservative (default) - 7 daily, 4 weekly, 6 monthly
2) Aggressive - 14 daily, 8 weekly, 12 monthly
3) Minimal - 3 daily, 2 weekly, 3 monthly

For beginners: Choose "1" (Conservative) - This keeps enough backups for recovery without using too much space.

Compression Settings

You'll be asked about compression:

🗜️  Compression Configuration
===========================
Choose compression algorithm:

1) zstd (default) - Best balance of speed and compression
2) lz4 - Fastest compression, larger files
3) zlib - Good compression, moderate speed
4) lzma - Best compression, slower

For beginners: Choose "1" (zstd) - This provides good compression without being too slow.

Security Passphrase

You'll be asked to create a passphrase for your backups:

🔐 Security Configuration
======================
Enter a strong passphrase for backup encryption:
[Enter your passphrase]

Important: This passphrase encrypts your backups. Choose something strong and save it safely!

Passphrase tips:

Example: MyBackup@2024!Secure#Data

Step 5: Wait for Installation

After answering the questions, Borgmatic will install and start. You'll see messages like:

📦 Installing Borgmatic...
🔧 Creating backup configurations...
🔐 Setting up encryption...
🛡️  Creating security monitoring...
📅 Setting up schedules...
✅ Borgmatic installed successfully!

Step 6: Understanding What Was Created

Borgmatic installation creates a sophisticated backup system with two types of backups:

File Backups

These backup all your application files:

Database Backups

These backup all your databases:

Security Features

Borgmatic includes advanced security:

Step 7: Verify Borgmatic is Working

Let's make sure Borgmatic is running properly.

Check Status in Infinity Tools

In the Infinity Tools menu, go to:

You should see Borgmatic listed as "RUNNING" or "ACTIVE".

Using the Status Dashboard

The Status & Health section shows you:

Look for the green checkmarks - they indicate everything is working properly!

Check Backup Status

You can also check by going to:

This will show you:

Step 8: Understanding Backup Storage

Borgmatic stores your backups in a special location:

Backup Location

Your backups are stored in:

Backup Structure

Your backup repository contains:

Step 9: Test Your First Backup

Let's run a test backup to make sure everything works:

Manual Backup Test

In the Infinity Tools menu, go to:

This will start a backup immediately and show you the progress.

What You'll See

During the backup, you'll see messages like:

Starting SpeedBits file backup...
Creating archive speedbits-files-server-2024-01-15-143000...
Backing up /opt/speedbits/vaultwarden...
Backing up /opt/speedbits/traefik...
File backup completed successfully

Understanding Backup Progress

The backup process shows:

What's Next?

Congratulations! You now have an automated backup system protecting all your data.

What You've Accomplished

Next Steps

Now you can:

Troubleshooting

Backup Not Running

If backups aren't running:

Backup Fails

If backups fail:

Can't Access Backups

If you can't access your backups:

Quick Reference

Check Borgmatic status:

docker ps | grep borgmatic

View backup logs:

docker logs borgmatic

Run manual backup:

docker exec borgmatic borgmatic --config /etc/borgmatic/borgmatic-files.yml create

List all backups:

docker exec borgmatic borg list /backups/borgmatic-repo

You're Ready!

Borgmatic is now installed and protecting your data! You have a professional-grade backup system that runs automatically and keeps your data safe.

What you accomplished:

Next step: You can now install your first application (Vaultwarden) knowing it will be automatically backed up and protected!

What You Learned

You now have enterprise-grade data protection running on your server!


Next: Installing Vaultwarden - Your Password Manager (Chapter 7)


Revision #6
Created 30 October 2025 13:07:09 by bjoern
Updated 17 November 2025 16:27:25 by bjoern