Updated documentation so "sudo borgmatic" works for pipx borgmatic installations (#757).
continuous-integration/drone Build was killed Details

This commit is contained in:
Dan Helfman 2023-09-17 22:46:33 -07:00
parent 5a56208922
commit b540e63c0e
3 changed files with 39 additions and 10 deletions

1
NEWS
View File

@ -6,6 +6,7 @@
format. format.
* #754: Fix error handling to log command output as one record per line instead of truncating * #754: Fix error handling to log command output as one record per line instead of truncating
too-long output and swallowing the end of some Borg error messages. too-long output and swallowing the end of some Borg error messages.
* #757: Updated documentation so "sudo borgmatic" works for pipx borgmatic installations.
* Update documentation to recommend installing/upgrading borgmatic with pipx instead of pip. See the * Update documentation to recommend installing/upgrading borgmatic with pipx instead of pip. See the
documentation for more information: documentation for more information:
https://torsion.org/borgmatic/docs/how-to/set-up-backups/#installation https://torsion.org/borgmatic/docs/how-to/set-up-backups/#installation

View File

@ -31,6 +31,7 @@ changes work:
```bash ```bash
cd borgmatic cd borgmatic
pipx ensurepath
pipx install --editable . pipx install --editable .
``` ```

View File

@ -7,6 +7,8 @@ eleventyNavigation:
--- ---
## Installation ## Installation
### Prerequisites
First, [install First, [install
Borg](https://borgbackup.readthedocs.io/en/stable/installation.html), at least Borg](https://borgbackup.readthedocs.io/en/stable/installation.html), at least
version 1.1. borgmatic does not install Borg automatically so as to avoid version 1.1. borgmatic does not install Borg automatically so as to avoid
@ -18,31 +20,56 @@ Python applications on your system. If you have trouble installing pipx with
pip, then you can install a system package instead. E.g. on Ubuntu or Debian, pip, then you can install a system package instead. E.g. on Ubuntu or Debian,
run: run:
``` ```bash
sudo apt update sudo apt update
sudo apt install pipx sudo apt install pipx
sudo pipx ensurepath
``` ```
Finally, install borgmatic with pipx by running the following command: ### Root install
If you want to run borgmatic on a schedule with privileged access to your
files, then you should install borgmatic as the root user by running the
following commands:
```bash ```bash
sudo pipx ensurepath
sudo pipx install borgmatic sudo pipx install borgmatic
``` ```
Check whether all of this worked with: Check whether this worked with:
```bash ```bash
sudo borgmatic --version sudo su -
borgmatic --version
``` ```
If borgmatic is properly installed, that should output your borgmatic version. If borgmatic is properly installed, that should output your borgmatic version.
And if you'd also like `sudo borgmatic` to work, keep reading!
Many users need to backup system files that require privileged access, so
these instructions install and run borgmatic as the root user. But if you ### Non-root install
don't need to backup such files, you're welcome to install and run borgmatic
as a non-root user. To do that, run the `pipx` and `borgmatic` commands If you only want to run borgmatic as a non-root user (without privileged file
above without `sudo`. 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:
```bash
pipx ensurepath
pipx install borgmatic
```
This should work even if you've also installed borgmatic as the root user.
Check whether this worked with:
```bash
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`.
### Other ways to install ### Other ways to install