From ed14fdbac9844e8fc55a732a7bcebbfd7826fa59 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Sun, 12 May 2019 01:14:30 +0200 Subject: [PATCH 1/3] Recommend root user package install This can do bad things to a system Python install. So, we try to mitigate this by recommending a root user user site installation. --- docs/how-to/set-up-backups.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/how-to/set-up-backups.md b/docs/how-to/set-up-backups.md index c1cbd2181..e8b266dc1 100644 --- a/docs/how-to/set-up-backups.md +++ b/docs/how-to/set-up-backups.md @@ -7,16 +7,24 @@ To get up and running, first [install Borg](https://borgbackup.readthedocs.io/en/latest/installation.html), at least version 1.1. -Then, run the following command to download and install borgmatic: +Borgmatic consumes configurations in `/etc/borgmatic/` and `/etc/borgmatic.d/` +by default. Therefore, we show how to install borgmatic for the root user which +will have access permissions for these locations by default. + +Run the following commands to download and install borgmatic: ```bash -sudo pip3 install --upgrade borgmatic +sudo pip3 install --user --upgrade borgmatic ``` +This is a [recommended user site +installation](https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site). +You will need to ensure that `/root/.local/bin` is available on your `$PATH` so +that the borgmatic executable is available. + Note that your pip binary may have a different name than "pip3". Make sure you're using Python 3, as borgmatic does not support Python 2. - ### Other ways to install Along with the above process, you have several other options for installing From 15cb6270efe27198128ffeb9bf3715e189235464 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Mon, 13 May 2019 13:18:45 +0200 Subject: [PATCH 2/3] Recommend a tox user install for developing --- docs/how-to/develop-on-borgmatic.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/how-to/develop-on-borgmatic.md b/docs/how-to/develop-on-borgmatic.md index e6590c675..e8f04dcef 100644 --- a/docs/how-to/develop-on-borgmatic.md +++ b/docs/how-to/develop-on-borgmatic.md @@ -41,7 +41,7 @@ you're in the `borgmatic/` working copy, install tox, which is used for setting up testing environments: ```bash -sudo pip3 install tox +pip3 install --user tox ``` Finally, to actually run tests, run: From f9dce8b2d3af877bbf4997a8ac5d42930db8437f Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Mon, 13 May 2019 13:18:59 +0200 Subject: [PATCH 3/3] Recommend user installs when upgrading --- docs/how-to/upgrade.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/how-to/upgrade.md b/docs/how-to/upgrade.md index 8ba14e107..e0c1e7f27 100644 --- a/docs/how-to/upgrade.md +++ b/docs/how-to/upgrade.md @@ -7,7 +7,7 @@ In general, all you should need to do to upgrade borgmatic is run the following: ```bash -sudo pip3 install --upgrade borgmatic +sudo pip3 install --user --upgrade borgmatic ``` See below about special cases. @@ -25,14 +25,14 @@ already running borgmatic with Python 3, then you can upgrade borgmatic in-place: ```bash -sudo pip3 install --upgrade borgmatic +sudo pip3 install --user --upgrade borgmatic ``` But if you were running borgmatic with Python 2, uninstall and reinstall instead: ```bash sudo pip uninstall borgmatic -sudo pip3 install borgmatic +sudo pip3 install --user borgmatic ``` The pip binary names for different versions of Python can differ, so the above @@ -67,7 +67,7 @@ from atticmatic to borgmatic by running the following commands: ```bash sudo pip3 uninstall atticmatic -sudo pip3 install borgmatic +sudo pip3 install --user borgmatic ``` That's it! borgmatic will continue using your /etc/borgmatic configuration