borgmatic

πŸ“₯ How to install borgmatic

πŸ”

Prerequisites

Before installing borgmatic, first install Borg, at least version 1.1. (borgmatic does not install Borg automatically so as to avoid conflicts with existing Borg installations.)

Then, install uv as the root user (with sudo) to make installing borgmatic easier without impacting other Python applications on your system. For Debian, there is a third-party package for uv. On Ubuntu, there is a snap package. On Arch, you can just install the python-uv package.

Root install

If you want borgmatic to run with privileged access so it can backup your system files, then install borgmatic as the root user by running the following commands:

sudo uv tool update-shell
sudo uv tool install borgmatic

Check whether this worked with:

sudo su -
borgmatic --version

If borgmatic is properly installed, that should output your borgmatic version. And if you'd also like sudo borgmatic to work as well, keep reading!

Non-root install

If you only want to run borgmatic as a non-root user (without privileged file access) or you want to make sudo borgmatic work so borgmatic runs as root, then install borgmatic as a non-root user by running the following commands as that user:

uv tool update-shell
uv tool install borgmatic

This should work even if you've also installed borgmatic as the root user.

Check whether this worked with:

borgmatic --version

If borgmatic is properly installed, that should output your borgmatic version. You can also try sudo borgmatic --version if you intend to run borgmatic with sudo. If that doesn't work, you may need to update your sudoers secure_path option.

Other ways to install

Besides the approaches described above, there are several other options for installing borgmatic:

Docker / Podman

Operating system packages

Etc.

Next steps

Improve this documentation

Have an idea on how to make this documentation even better? Use our issue tracker to send your feedback!