-
How-to guides
- π₯ Install borgmatic
- π Set up backups
- ποΈ Make per-application backups
- π Provide your passwords
- βοΈ Make backups redundant
- π Deal with very large backups
- π Inspect your backups
- π¨ Monitor your backups
- π€ Extract a backup
- ποΈ Backup your databases
- πΈ Snapshot your filesystems
- π§Ή Add preparation and cleanup steps
- πΎ Backup to a removable drive/server
- π§ Run arbitrary Borg commands
- π₯ Customize warnings/errors
- π¦ Upgrade borgmatic/Borg
- ποΈ Develop on borgmatic
-
Reference guides
- βοΈ Configuration
- π» Command-line
- π Source code
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
- container image with scheduled backups (+ Docker Compose files)
- container image with multi-arch and Docker CLI support
- Borgmatic Director UI
Operating system packages
- Debian
- Ubuntu
- Fedora
- Gentoo
- Arch Linux
- Alpine Linux
- OpenBSD
- openSUSE
- macOS (via Homebrew)
- macOS (via MacPorts)
- NixOS
Etc.
- stand-alone Linux binary (This is a beta feature!)
- Ansible role
- pipx
Next steps
Improve this documentation
Have an idea on how to make this documentation even better? Use our issue tracker to send your feedback!