Borgmatic for beginners
Borgmatic UI - Beginner's Guide
Welcome to Borgmatic UI! This guide will help you understand the basics of backing up your data using this powerful yet easy-to-use backup management interface.
Understanding Key Concepts
Before diving in, it's important to understand the terminology used throughout the application. These terms come from the underlying backup tools (Borg and Borgmatic) and understanding them will make everything much clearer.
🗄️ Repository
What is it?
Key points:
- A repository is created once and can hold many backups over time
- Repositories are encrypted by default - you'll set a passphrase when creating one
- You can have multiple repositories (e.g., one local, one remote)
- Repositories can be stored locally (on your server) or remotely (SSH server, cloud storage)
Important:
💾 Backup (Backup Job)
What is it?
- What
- Where
- How
- When
Example:
/var/www📦 Archive
What is it?
Key points:
- Archives are stored inside repositories
- Each archive has a unique name (usually including a timestamp)
- Archives are deduplicated - only changed data is stored, saving space
- You can browse, restore, or delete individual archives
Analogy:
⏰ Schedules
Schedules allow you to automate your backups so they run without manual intervention.
How Schedules Work
- Schedules are attached to backup jobs
- You can set backups to run hourly, daily, weekly, or with custom cron expressions
- Scheduled backups run automatically in the background
- You'll see the status and history of scheduled runs in the dashboard
Common Schedule Patterns
| Pattern | Description | Best For |
|---|---|---|
| Daily at 2:00 AM |
Runs once per day during low-activity hours |
Most use cases |
| Every 6 hours |
Runs 4 times per day |
Frequently changing data |
| Weekly on Sunday |
Runs once per week |
Large, stable datasets |
🔑 SSH Keys
SSH Keys are used for secure, passwordless authentication when connecting to remote servers for backup storage.
Why Use SSH Keys?
- Security:
- Automation:
- Convenience:
How to Set Up SSH Keys
- Go to
- Either
- Copy the
- Test the connection to verify it works
~/.ssh/authorized_keysTip:
🗃️ Storage Types
When creating a repository, you can choose from several storage types depending on where you want to store your backups.
Local Repository
Path format:
/path/to/repository- Stored on the same server or a mounted drive
- Fastest backup and restore speeds
- Best for: Quick backups, staging before cloud sync
SSH/SFTP Repository
Path format:
ssh://user@hostname/path/to/repository- Stored on a remote server via SSH
- Requires SSH key or password authentication
- Best for: Off-site backups, dedicated backup servers
Cloud Storage (with Rclone)
For cloud storage like Amazon S3, Backblaze B2, Google Drive, etc.
Option 1: Local + Cloud Sync (Recommended)
- Backups are stored locally first
- Automatically synced to cloud after each backup
- Faster backups, cloud redundancy
Option 2: Native Cloud (Borg 2.x only)
- Borg 2.x can write directly to S3-compatible storage
- No Rclone required
- Simplest cloud setup
🔄 How to Restore (Retrieve) Backups
Restoring your data is just as important as backing it up. Here's how to retrieve files from your backups.
Step 1: Navigate to Archives
- Go to
- Select the repository containing your backup
- You'll see a list of all archives (snapshots) in that repository
Step 2: Browse the Archive
- Click on an archive to open the
- Navigate through folders just like a file explorer
- Preview text files directly in the browser
Step 3: Restore Files
You have three options when restoring:
| Option | Description | Use Case |
|---|---|---|
| Restore to New Location |
Extract files to a folder you choose |
Safest option - review before replacing |
| Download | Download files to your computer (folders are zipped) |
Quick access, small files |
| Restore to Original Location |
Put files back where they came from |
Full restore after data loss |
Caution:
🚀 Quick Start Guide
Ready to create your first backup? Follow these steps:
1. Create a Repository
- Go to
- Choose a storage type (Local is easiest to start)
- Set a path (e.g.,
- Enter a strong passphrase and save it somewhere safe!
- Click
/host/backups/my-repo2. Create a Backup Job
- Go to
- Give it a name (e.g., "My Documents")
- Select your repository
- Add source paths (what to back up)
- Optionally set a schedule
- Click
3. Run Your First Backup
- Find your backup job in the list
- Click the
- Watch the progress in the dashboard
- Once complete, you'll have your first archive!
4. Verify Your Backup
- Go to
- Select your repository
- Click on the archive to browse its contents
- Confirm your files are there
💡 Tips for Beginners
- Start small:
- Use descriptive names:
- Test restores:
- Multiple destinations:
- Monitor the dashboard:
- Keep passphrases safe:
📚 Glossary
| Term | Definition |
|---|---|
| Borg | The underlying backup program that handles deduplication and encryption |
| Borgmatic | A wrapper around Borg that simplifies configuration and automation |
| Deduplication | Only storing unique data chunks, saving significant storage space |
| Archive | A single backup snapshot at a point in time |
| Repository | The storage location containing all your archives |
| Passphrase | The password used to encrypt/decrypt your repository |
| Rclone | A tool for syncing files to cloud storage providers |
| SSH Key |
A cryptographic key pair for secure, passwordless server authentication |
| Retention | Rules for how long to keep old archives before pruning them |
| Pruning | Removing old archives according to retention rules to save space |
Congratulations!