BorgBackup vs Borgmatic: Do You Need the Wrapper?

They’re Not Competitors — One Wraps the Other

This isn’t a typical “A vs B, pick one” comparison. Borgmatic is BorgBackup — it’s a YAML-driven automation layer that calls borg commands under the hood. The real question: should you use BorgBackup directly, or let Borgmatic manage it for you?

Short answer: Borgmatic for 90% of self-hosters. Raw BorgBackup only if you need surgical control over every borg flag or you’re embedding backup commands in existing automation (Ansible, custom scripts).

How They Relate

AspectBorgBackupBorgmatic
What it isDeduplicating backup engineYAML wrapper for BorgBackup
Written inPython/CythonPython
InterfaceCLI onlyYAML config + CLI
Docker supportNot designed for DockerOfficial Docker image available
SchedulingManual or external cronBuilt-in cron via Docker
ConfigurationShell scripts or raw commandsSingle YAML file
Pre/post hooksManual scriptingBuilt into config
Database dumpsManual pg_dump/mysqldumpNative PostgreSQL/MySQL/MariaDB hooks
Monitoring integrationNone built-inHealthchecks.io, Cronitor, PagerDuty
Retention managementManual borg prune commandsDeclarative in YAML
Learning curveSteep (many flags)Moderate (YAML config)
Latest version1.4.31.9.14

When Raw BorgBackup Makes Sense

Use BorgBackup directly when:

  • You have existing automation. If you already have Ansible playbooks, shell scripts, or a CI/CD pipeline handling backups, adding Borgmatic is another layer to maintain.
  • You need non-standard borg flags. Borgmatic exposes most flags, but niche options (custom chunk sizes, --nobsdflags, remote borg path overrides) sometimes require raw commands.
  • You’re backing up from non-Docker systems. BorgBackup installs via pip install borgbackup or system packages. No container needed.
  • You want to understand what’s happening. Learning raw BorgBackup first makes you better at debugging Borgmatic when something breaks.
# Raw BorgBackup workflow
borg init --encryption=repokey /mnt/backup/repo
borg create --stats --progress /mnt/backup/repo::'{hostname}-{now}' /home /etc
borg prune --keep-daily=7 --keep-weekly=4 --keep-monthly=6 /mnt/backup/repo
borg compact /mnt/backup/repo

Four commands, four concepts, total control.

When Borgmatic Is the Better Choice

Use Borgmatic when:

  • You want set-and-forget backups. Define sources, destinations, retention, and schedule in one YAML file. Borgmatic handles init, create, prune, compact, and check in sequence.
  • You need database dumps. Borgmatic dumps PostgreSQL, MySQL, MariaDB, MongoDB, and SQLite databases before running borg, then cleans up after.
  • You run Docker. Borgmatic’s official container (ghcr.io/borgmatic-collective/borgmatic:1.9.14) includes cron scheduling, so you don’t need a separate cron container or host cron job.
  • You want monitoring. Built-in hooks for Healthchecks.io, Cronitor, and PagerDuty — no extra scripting.
# borgmatic config.yaml — replaces the 4-command workflow above
repositories:
  - path: /mnt/backup/repo
    label: main

source_directories:
  - /home
  - /etc

encryption_passphrase: "${BORG_PASSPHRASE}"

retention:
  keep_daily: 7
  keep_weekly: 4
  keep_monthly: 6

hooks:
  healthchecks:
    ping_url: https://hc-ping.io/your-uuid

postgresql_databases:
  - name: all
    hostname: postgres
    username: backup_user

One file, same result, plus database dumps and health monitoring.

Performance

Both are identical — Borgmatic calls BorgBackup’s engine. No performance overhead from the wrapper. Deduplication ratio, compression speed, encryption performance — all determined by BorgBackup’s C/Cython implementation.

MetricBorgBackupBorgmatic
Backup speed~150-300 MB/s (depends on I/O)Identical
DeduplicationVariable-length chunkingIdentical (uses borg)
EncryptionAES-256-CTR + HMAC-SHA256Identical (uses borg)
CompressionLZ4, ZSTD, ZLIB, LZMAIdentical (uses borg)
Memory usage~200-500 MB during backup~210-520 MB (minimal Python overhead)

Complexity Comparison

BorgBackup requires you to:

  1. Write a shell script with borg create, borg prune, borg compact
  2. Set up cron or systemd timer
  3. Handle errors and notifications yourself
  4. Manually script database dumps before backup runs
  5. Remember to run borg check periodically

Borgmatic requires you to:

  1. Write a YAML config file
  2. Run borgmatic (or use the Docker image with built-in cron)

That’s the entire value proposition. If managing shell scripts is your thing, BorgBackup is fine. If you’d rather declare intent in YAML and let automation handle the rest, Borgmatic saves real time.

Migration

Already using raw BorgBackup? Borgmatic reads existing borg repositories without modification. Point Borgmatic at your existing repo, configure the same sources and retention, and it takes over. No re-initialization needed.

Already using Borgmatic? You can always drop down to raw borg commands for one-off operations (manual restore, repo inspection) without affecting Borgmatic’s config.

FAQ

Does Borgmatic add any overhead?

No measurable overhead. It’s a thin Python layer that constructs and executes borg commands. The actual backup engine is identical.

Can I use both?

Yes. Use Borgmatic for scheduled backups, raw borg for manual restores or inspections. They operate on the same repositories.

Does Borgmatic support Borg 2.0?

Borgmatic 1.9.x supports Borg 1.4.x. Borg 2.0 compatibility is in progress — check the Borgmatic docs for the latest status.

Which should a beginner use?

Borgmatic. It reduces the surface area for mistakes and handles the common “forgot to prune” and “forgot to compact” problems automatically.

Final Verdict

Use Borgmatic unless you have a specific reason not to. It’s not a different backup tool — it’s BorgBackup with guardrails. The YAML config replaces fragile shell scripts, the Docker image replaces cron setup, and the monitoring hooks replace DIY notification scripts.

The only people who should use raw BorgBackup are those who already have backup automation in place and don’t want another tool in the chain. Everyone else saves time and reduces mistakes with Borgmatic.