How to install borgmatic to CentOS7

494

Download and install borgmatic as the root user, run the following commands:

sudo pip3 install --user --upgrade borgmatic
Collecting borgmatic
  Downloading https://files.pythonhosted.org/packages/6d/bd/606b7af164c35fe08061ae8618281ad72373be1f3dcd1d39cd48fd98d09e/borgmatic-1.4.17-py3-none-any.whl (113kB)
    100% |████████████████████████████████| 122kB 4.1MB/s
Collecting requests (from borgmatic)
  Downloading https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl (57kB)
    100% |████████████████████████████████| 61kB 5.9MB/s
Collecting pykwalify<14.06,>=1.6.0 (from borgmatic)
  Downloading https://files.pythonhosted.org/packages/36/9f/612de8ca540bd24d604f544248c4c46e9db76f6ea5eb75fb4244da6ebbf0/pykwalify-1.7.0-py2.py3-none-any.whl (40kB)
    100% |████████████████████████████████| 40kB 6.3MB/s
Collecting ruamel.yaml<0.17.0,>0.15.0 (from borgmatic)
  Downloading https://files.pythonhosted.org/packages/fa/90/ecff85a2e9c497e2fa7142496e10233556b5137db5bd46f3f3b006935ca8/ruamel.yaml-0.16.5-py2.py3-none-any.whl (123kB)
    100% |████████████████████████████████| 133kB 5.3MB/s
Collecting colorama<0.5,>=0.4.1 (from borgmatic)
  Downloading https://files.pythonhosted.org/packages/4f/a6/728666f39bfff1719fc94c481890b2106837da9318031f71a8424b662e12/colorama-0.4.1-py2.py3-none-any.whl
Collecting setuptools (from borgmatic)
  Downloading https://files.pythonhosted.org/packages/54/28/c45d8b54c1339f9644b87663945e54a8503cfef59cf0f65b3ff5dd17cf64/setuptools-42.0.2-py2.py3-none-any.whl (583kB)
    100% |████████████████████████████████| 583kB 342kB/s
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests->borgmatic)
  Downloading https://files.pythonhosted.org/packages/b4/40/a9837291310ee1ccc242ceb6ebfd9eb21539649f193a7c8c86ba15b98539/urllib3-1.25.7-py2.py3-none-any.whl (125kB)
    100% |████████████████████████████████| 133kB 2.5MB/s
Collecting certifi>=2017.4.17 (from requests->borgmatic)
  Downloading https://files.pythonhosted.org/packages/b9/63/df50cac98ea0d5b006c55a399c3bf1db9da7b5a24de7890bc9cfd5dd9e99/certifi-2019.11.28-py2.py3-none-any.whl (156kB)
    100% |████████████████████████████████| 163kB 3.4MB/s
Collecting idna<2.9,>=2.5 (from requests->borgmatic)
  Downloading https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl (58kB)
    100% |████████████████████████████████| 61kB 5.4MB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests->borgmatic)
  Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 4.1MB/s
Collecting python-dateutil>=2.4.2 (from pykwalify<14.06,>=1.6.0->borgmatic)
  Downloading https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl (227kB)
    100% |████████████████████████████████| 235kB 422kB/s
Collecting docopt>=0.6.2 (from pykwalify<14.06,>=1.6.0->borgmatic)
  Downloading https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz
Collecting PyYAML>=3.11 (from pykwalify<14.06,>=1.6.0->borgmatic)
  Downloading https://files.pythonhosted.org/packages/8d/c9/e5be955a117a1ac548cdd31e37e8fd7b02ce987f9655f5c7563c656d5dcb/PyYAML-5.2.tar.gz (265kB)
    100% |████████████████████████████████| 266kB 393kB/s
Collecting ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.8" (from ruamel.yaml<0.17.0,>0.15.0->borgmatic)
  Downloading https://files.pythonhosted.org/packages/53/77/4bcd63f362bcb6c8f4f06253c11f9772f64189bf08cf3f40c5ccbda9e561/ruamel.yaml.clib-0.2.0-cp36-cp36m-manylinux1_x86_64.whl (548kB)
    100% |████████████████████████████████| 552kB 309kB/s
Collecting six>=1.5 (from python-dateutil>=2.4.2->pykwalify<14.06,>=1.6.0->borgmatic)
  Downloading https://files.pythonhosted.org/packages/65/26/32b8464df2a97e6dd1b656ed26b2c194606c16fe163c695a992b36c11cdf/six-1.13.0-py2.py3-none-any.whl
Installing collected packages: urllib3, certifi, idna, chardet, requests, six, python-dateutil, docopt, PyYAML, pykwalify, ruamel.yaml.clib, ruamel.yaml, colorama, setuptools, borgmatic
  Running setup.py install for docopt ... done
  Running setup.py install for PyYAML ... done
Successfully installed PyYAML-5.2 borgmatic-1.4.17 certifi-2019.11.28 chardet-3.0.4 colorama-0.4.1 docopt-0.6.2 idna-2.8 pykwalify-1.7.0 python-dateutil-2.8.1 requests-2.22.0 ruamel.yaml-0.16.5 ruamel.yaml.clib-0.2.0 setuptools-42.0.2 six-1.13.0 urllib3-1.25.7

This is a recommended user site installation. You will need to ensure that /root/.local/bin is available on your $PATH so that the borgmatic executable is available. For instance, adding this to root’s ~/.profile or ~/.bash_profile may do the trick:

export PATH="$PATH:~/.local/bin"

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.

Generate a sample configuration file:

#generate-borgmatic-config

Generated a sample configuration file at /etc/borgmatic/config.yaml.

Please edit the file to suit your needs. The values are representative.
All fields are optional except where indicated.

If you ever need help: https://torsion.org/borgmatic/#issues

Validate that your borgmatic configuration is valid

# validate-borgmatic-config

All given configuration files are valid: /etc/borgmatic/config.yaml
Source https://torsion.org/borgmatic/
Comments