2013-06-30 19:30:17 +00:00
|
|
|
.. include:: global.rst.inc
|
2016-07-11 21:16:53 +00:00
|
|
|
.. highlight:: bash
|
2013-06-30 19:30:17 +00:00
|
|
|
.. _installation:
|
|
|
|
|
|
|
|
Installation
|
2013-07-31 18:51:01 +00:00
|
|
|
============
|
2013-06-30 19:30:17 +00:00
|
|
|
|
2017-10-17 16:50:55 +00:00
|
|
|
There are different ways to install Borg:
|
2015-10-16 08:59:38 +00:00
|
|
|
|
2015-11-15 02:03:38 +00:00
|
|
|
- :ref:`distribution-package` - easy and fast if a package is
|
2015-11-16 03:42:49 +00:00
|
|
|
available from your distribution.
|
2015-11-15 02:03:38 +00:00
|
|
|
- :ref:`pyinstaller-binary` - easy and fast, we provide a ready-to-use binary file
|
2015-10-16 08:59:38 +00:00
|
|
|
that comes bundled with all dependencies.
|
2015-11-15 02:03:38 +00:00
|
|
|
- :ref:`source-install`, either:
|
2015-08-28 23:17:19 +00:00
|
|
|
|
2015-11-15 02:03:38 +00:00
|
|
|
- :ref:`pip-installation` - installing a source package with pip needs
|
|
|
|
more installation steps and requires all dependencies with
|
|
|
|
development headers and a compiler.
|
|
|
|
- :ref:`git-installation` - for developers and power users who want to
|
|
|
|
have the latest code or use revision control (each release is
|
|
|
|
tagged).
|
2013-06-30 19:30:17 +00:00
|
|
|
|
2015-11-15 02:03:38 +00:00
|
|
|
.. _distribution-package:
|
|
|
|
|
|
|
|
Distribution Package
|
|
|
|
--------------------
|
2014-02-04 02:26:36 +00:00
|
|
|
|
2015-11-16 03:42:49 +00:00
|
|
|
Some distributions might offer a ready-to-use ``borgbackup``
|
2016-06-03 14:45:06 +00:00
|
|
|
package which can be installed with the package manager.
|
|
|
|
|
|
|
|
.. important:: Those packages may not be up to date with the latest
|
2017-10-17 16:50:55 +00:00
|
|
|
Borg releases. Before submitting a bug
|
2016-06-03 14:45:06 +00:00
|
|
|
report, check the package version and compare that to
|
|
|
|
our latest release then review :doc:`changes` to see if
|
|
|
|
the bug has been fixed. Report bugs to the package
|
2017-10-17 16:50:55 +00:00
|
|
|
maintainer rather than directly to Borg if the
|
2016-06-03 14:45:06 +00:00
|
|
|
package is out of date in the distribution.
|
|
|
|
|
|
|
|
.. keep this list in alphabetical order
|
2015-04-27 20:35:06 +00:00
|
|
|
|
2016-01-13 20:23:34 +00:00
|
|
|
============ ============================================= =======
|
|
|
|
Distribution Source Command
|
|
|
|
============ ============================================= =======
|
2019-03-01 21:11:48 +00:00
|
|
|
Alpine Linux `Alpine repository`_ ``apk add borgbackup``
|
2016-01-13 20:23:34 +00:00
|
|
|
Arch Linux `[community]`_ ``pacman -S borg``
|
2017-03-07 13:38:45 +00:00
|
|
|
Debian `Debian packages`_ ``apt install borgbackup``
|
2016-03-25 06:21:18 +00:00
|
|
|
Gentoo `ebuild`_ ``emerge borgbackup``
|
2016-03-25 04:13:24 +00:00
|
|
|
GNU Guix `GNU Guix`_ ``guix package --install borg``
|
2017-03-07 13:38:45 +00:00
|
|
|
Fedora/RHEL `Fedora official repository`_ ``dnf install borgbackup``
|
2016-06-03 14:45:06 +00:00
|
|
|
FreeBSD `FreeBSD ports`_ ``cd /usr/ports/archivers/py-borgbackup && make install clean``
|
2021-02-08 19:09:37 +00:00
|
|
|
macOS `Homebrew`_ | ``brew install borgbackup`` (official formula, **no** FUSE support)
|
|
|
|
| **or**
|
2022-01-28 00:54:06 +00:00
|
|
|
| ``brew install --cask macfuse`` (`private Tap`_, FUSE support)
|
2021-02-08 19:09:37 +00:00
|
|
|
| ``brew install borgbackup/tap/borgbackup-fuse``
|
2016-06-03 14:45:06 +00:00
|
|
|
Mageia `cauldron`_ ``urpmi borgbackup``
|
2016-01-22 19:35:53 +00:00
|
|
|
NetBSD `pkgsrc`_ ``pkg_add py-borgbackup``
|
2017-10-20 16:08:10 +00:00
|
|
|
NixOS `.nix file`_ ``nix-env -i borgbackup``
|
2016-04-09 20:19:03 +00:00
|
|
|
OpenBSD `OpenBSD ports`_ ``pkg_add borgbackup``
|
2016-06-03 14:45:06 +00:00
|
|
|
OpenIndiana `OpenIndiana hipster repository`_ ``pkg install borg``
|
2017-07-04 09:57:33 +00:00
|
|
|
openSUSE `openSUSE official repository`_ ``zypper in borgbackup``
|
2016-06-03 14:45:06 +00:00
|
|
|
Raspbian `Raspbian testing`_ ``apt install borgbackup``
|
2017-03-07 13:38:45 +00:00
|
|
|
Ubuntu `Ubuntu packages`_, `Ubuntu PPA`_ ``apt install borgbackup``
|
2016-01-13 20:23:34 +00:00
|
|
|
============ ============================================= =======
|
2014-12-16 03:02:43 +00:00
|
|
|
|
2019-03-01 21:11:48 +00:00
|
|
|
.. _Alpine repository: https://pkgs.alpinelinux.org/packages?name=borgbackup
|
2015-12-01 22:16:25 +00:00
|
|
|
.. _[community]: https://www.archlinux.org/packages/?name=borg
|
2017-03-07 13:38:45 +00:00
|
|
|
.. _Debian packages: https://packages.debian.org/search?keywords=borgbackup&searchon=names&exact=1&suite=all§ion=all
|
2016-06-03 14:45:06 +00:00
|
|
|
.. _Fedora official repository: https://apps.fedoraproject.org/packages/borgbackup
|
2020-12-19 19:11:32 +00:00
|
|
|
.. _FreeBSD ports: https://www.freshports.org/archivers/py-borgbackup/
|
2016-03-25 06:21:18 +00:00
|
|
|
.. _ebuild: https://packages.gentoo.org/packages/app-backup/borgbackup
|
2016-06-03 14:45:06 +00:00
|
|
|
.. _GNU Guix: https://www.gnu.org/software/guix/package-list.html#borg
|
2016-01-22 19:35:53 +00:00
|
|
|
.. _pkgsrc: http://pkgsrc.se/sysutils/py-borgbackup
|
2016-06-03 14:45:06 +00:00
|
|
|
.. _cauldron: http://madb.mageia.org/package/show/application/0/release/cauldron/name/borgbackup
|
2021-10-05 00:53:11 +00:00
|
|
|
.. _.nix file: https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/backup/borgbackup/default.nix
|
2020-12-19 19:11:32 +00:00
|
|
|
.. _OpenBSD ports: https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/sysutils/borgbackup/
|
|
|
|
.. _OpenIndiana hipster repository: https://pkg.openindiana.org/hipster/en/search.shtml?token=borg&action=Search
|
|
|
|
.. _openSUSE official repository: https://software.opensuse.org/package/borgbackup
|
2020-08-18 15:51:25 +00:00
|
|
|
.. _Homebrew: https://formulae.brew.sh/formula/borgbackup
|
2021-02-08 19:09:37 +00:00
|
|
|
.. _private Tap: https://github.com/borgbackup/homebrew-tap
|
2020-12-19 19:11:32 +00:00
|
|
|
.. _Raspbian testing: https://archive.raspbian.org/raspbian/pool/main/b/borgbackup/
|
|
|
|
.. _Ubuntu packages: https://packages.ubuntu.com/xenial/borgbackup
|
2017-03-07 13:38:45 +00:00
|
|
|
.. _Ubuntu PPA: https://launchpad.net/~costamagnagianfranco/+archive/ubuntu/borgbackup
|
2015-11-15 02:07:16 +00:00
|
|
|
|
|
|
|
Please ask package maintainers to build a package or, if you can package /
|
|
|
|
submit it yourself, please help us with that! See :issue:`105` on
|
|
|
|
github to followup on packaging efforts.
|
|
|
|
|
2021-01-09 14:58:47 +00:00
|
|
|
**Current status of package in the repositories**
|
|
|
|
|
|
|
|
.. start-badges
|
|
|
|
|
|
|
|
|Packaging status|
|
2021-01-22 22:21:13 +00:00
|
|
|
|
2021-01-09 14:58:47 +00:00
|
|
|
.. |Packaging status| image:: https://repology.org/badge/vertical-allrepos/borgbackup.svg
|
|
|
|
:alt: Packaging status
|
|
|
|
:target: https://repology.org/project/borgbackup/versions
|
|
|
|
|
|
|
|
.. end-badges
|
|
|
|
|
2015-11-15 02:03:38 +00:00
|
|
|
.. _pyinstaller-binary:
|
2013-06-30 19:30:17 +00:00
|
|
|
|
2015-11-15 19:23:33 +00:00
|
|
|
Standalone Binary
|
2015-11-15 02:08:28 +00:00
|
|
|
-----------------
|
2015-09-21 19:28:18 +00:00
|
|
|
|
2016-11-03 18:10:38 +00:00
|
|
|
.. note:: Releases are signed with an OpenPGP key, see
|
|
|
|
:ref:`security-contact` for more instructions.
|
|
|
|
|
2018-12-06 20:41:30 +00:00
|
|
|
Borg x86/x64 amd/intel compatible binaries (generated with `pyinstaller`_)
|
|
|
|
are available on the releases_ page for the following platforms:
|
2015-09-21 19:28:18 +00:00
|
|
|
|
2022-01-28 00:54:06 +00:00
|
|
|
* **Linux**: glibc >= 2.28 (ok for most supported Linux releases).
|
2017-07-16 22:10:05 +00:00
|
|
|
Older glibc releases are untested and may not work.
|
2021-08-05 20:56:02 +00:00
|
|
|
* **MacOS**: 10.12 or newer (To avoid signing issues download the file via
|
2021-02-11 20:31:40 +00:00
|
|
|
command line **or** remove the ``quarantine`` attribute after downloading:
|
|
|
|
``$ xattr -dr com.apple.quarantine borg-macosx64.tgz``)
|
2021-08-05 20:56:02 +00:00
|
|
|
* **FreeBSD**: 12.1 (unknown whether it works for older releases)
|
2015-09-21 19:28:18 +00:00
|
|
|
|
2018-12-06 20:41:30 +00:00
|
|
|
ARM binaries are built by Johann Bauer, see: https://borg.bauerj.eu/
|
|
|
|
|
2015-11-20 14:49:53 +00:00
|
|
|
To install such a binary, just drop it into a directory in your ``PATH``,
|
|
|
|
make borg readable and executable for its users and then you can run ``borg``::
|
|
|
|
|
|
|
|
sudo cp borg-linux64 /usr/local/bin/borg
|
|
|
|
sudo chown root:root /usr/local/bin/borg
|
|
|
|
sudo chmod 755 /usr/local/bin/borg
|
|
|
|
|
2016-03-17 00:40:17 +00:00
|
|
|
Optionally you can create a symlink to have ``borgfs`` available, which is an
|
|
|
|
alias for ``borg mount``::
|
|
|
|
|
|
|
|
ln -s /usr/local/bin/borg /usr/local/bin/borgfs
|
|
|
|
|
2020-03-11 23:09:12 +00:00
|
|
|
Note that the binary uses /tmp to unpack Borg with all dependencies. It will
|
|
|
|
fail if /tmp has not enough free space or is mounted with the ``noexec``
|
|
|
|
option. You can change the temporary directory by setting the ``TEMP``
|
|
|
|
environment variable before running Borg.
|
2016-01-06 12:35:28 +00:00
|
|
|
|
2015-11-20 14:49:53 +00:00
|
|
|
If a new version is released, you will have to manually download it and replace
|
|
|
|
the old version using the same steps as shown above.
|
2015-09-21 19:28:18 +00:00
|
|
|
|
2015-11-15 02:08:28 +00:00
|
|
|
.. _pyinstaller: http://www.pyinstaller.org
|
2015-10-16 08:59:38 +00:00
|
|
|
.. _releases: https://github.com/borgbackup/borg/releases
|
2014-12-16 03:02:43 +00:00
|
|
|
|
2015-11-15 02:03:38 +00:00
|
|
|
.. _source-install:
|
|
|
|
|
2015-11-15 19:23:33 +00:00
|
|
|
From Source
|
2015-11-15 02:03:38 +00:00
|
|
|
-----------
|
2014-12-16 03:02:43 +00:00
|
|
|
|
2017-07-16 22:10:05 +00:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
Some older Linux systems (like RHEL/CentOS 5) and Python interpreter binaries
|
|
|
|
compiled to be able to run on such systems (like Python installed via Anaconda)
|
|
|
|
might miss functions required by Borg.
|
|
|
|
|
|
|
|
This issue will be detected early and Borg will abort with a fatal error.
|
|
|
|
|
2015-11-15 02:03:38 +00:00
|
|
|
Dependencies
|
|
|
|
~~~~~~~~~~~~
|
|
|
|
|
2017-10-17 16:50:55 +00:00
|
|
|
To install Borg from a source package (including pip), you have to install the
|
2015-10-16 08:59:38 +00:00
|
|
|
following dependencies first:
|
2014-12-16 03:02:43 +00:00
|
|
|
|
2022-02-25 23:13:19 +00:00
|
|
|
* `Python 3`_ >= 3.9.0, plus development headers.
|
2022-02-26 21:18:12 +00:00
|
|
|
* Libraries (library plus development headers):
|
2017-12-18 04:44:36 +00:00
|
|
|
|
2022-02-26 21:18:12 +00:00
|
|
|
- OpenSSL_ >= 1.1.1
|
|
|
|
- libacl_ (which depends on libattr_)
|
2017-12-18 04:44:36 +00:00
|
|
|
- liblz4_ >= 1.7.0 (r129)
|
|
|
|
- libzstd_ >= 1.3.0
|
2022-01-28 00:54:06 +00:00
|
|
|
- libxxhash >= 0.8.1 (0.8.0 might work also)
|
2019-03-19 22:17:15 +00:00
|
|
|
* pkg-config (cli tool) and pkgconfig python package (borg uses these to
|
|
|
|
discover header and library location - if it can't import pkgconfig and
|
|
|
|
is not pointed to header/library locations via env vars [see setup.py],
|
2022-02-26 21:18:12 +00:00
|
|
|
it will raise a fatal error).
|
2022-01-28 00:54:06 +00:00
|
|
|
**These must be present before invoking setup.py!**
|
2019-03-19 22:17:15 +00:00
|
|
|
* some other Python dependencies, pip will automatically install them for you.
|
2020-10-10 21:12:47 +00:00
|
|
|
* optionally, if you wish to mount an archive as a FUSE filesystem, you need
|
|
|
|
a FUSE implementation for Python:
|
|
|
|
|
|
|
|
- Either pyfuse3_ (preferably, newer and maintained) or llfuse_ (older,
|
|
|
|
unmaintained now). See also the BORG_FUSE_IMPL env variable.
|
|
|
|
- See setup.py about the version requirements.
|
2013-06-30 19:30:17 +00:00
|
|
|
|
2016-02-18 20:30:44 +00:00
|
|
|
If you have troubles finding the right package names, have a look at the
|
2017-07-16 22:10:05 +00:00
|
|
|
distribution specific sections below or the Vagrantfile in the git repository,
|
|
|
|
which contains installation scripts for a number of operating systems.
|
2016-02-18 20:30:44 +00:00
|
|
|
|
2015-10-16 08:59:38 +00:00
|
|
|
In the following, the steps needed to install the dependencies are listed for a
|
|
|
|
selection of platforms. If your distribution is not covered by these
|
|
|
|
instructions, try to use your package manager to install the dependencies. On
|
|
|
|
FreeBSD, you may need to get a recent enough OpenSSL version from FreeBSD
|
|
|
|
ports.
|
2013-06-30 19:30:17 +00:00
|
|
|
|
2015-10-16 08:59:38 +00:00
|
|
|
After you have installed the dependencies, you can proceed with steps outlined
|
|
|
|
under :ref:`pip-installation`.
|
2015-08-01 13:07:54 +00:00
|
|
|
|
2015-10-16 08:59:38 +00:00
|
|
|
Debian / Ubuntu
|
2015-11-15 02:03:38 +00:00
|
|
|
+++++++++++++++
|
2013-06-30 19:30:17 +00:00
|
|
|
|
2015-10-16 08:59:38 +00:00
|
|
|
Install the dependencies with development headers::
|
2015-05-14 18:47:08 +00:00
|
|
|
|
2021-01-07 09:31:26 +00:00
|
|
|
sudo apt-get install python3 python3-dev python3-pip python3-virtualenv \
|
2015-12-30 14:06:31 +00:00
|
|
|
libacl1-dev libacl1 \
|
2021-01-24 21:42:15 +00:00
|
|
|
libssl-dev \
|
2022-01-28 00:54:06 +00:00
|
|
|
liblz4-dev libzstd-dev libxxhash-dev \
|
2019-03-19 23:01:30 +00:00
|
|
|
build-essential \
|
|
|
|
pkg-config python3-pkgconfig
|
2020-10-10 21:12:47 +00:00
|
|
|
sudo apt-get install libfuse-dev fuse # needed for llfuse
|
|
|
|
sudo apt-get install libfuse3-dev fuse3 # needed for pyfuse3
|
2015-05-14 18:47:08 +00:00
|
|
|
|
2015-10-16 08:59:38 +00:00
|
|
|
In case you get complaints about permission denied on ``/etc/fuse.conf``: on
|
|
|
|
Ubuntu this means your user is not in the ``fuse`` group. Add yourself to that
|
|
|
|
group, log out and log in again.
|
2015-05-14 18:47:08 +00:00
|
|
|
|
2019-03-19 23:01:30 +00:00
|
|
|
Fedora
|
|
|
|
++++++
|
2017-07-29 09:55:26 +00:00
|
|
|
|
2015-10-16 08:59:38 +00:00
|
|
|
Install the dependencies with development headers::
|
2015-08-29 01:39:53 +00:00
|
|
|
|
2019-03-19 23:01:30 +00:00
|
|
|
sudo dnf install python3 python3-devel python3-pip python3-virtualenv \
|
|
|
|
libacl-devel libacl \
|
2021-01-24 21:42:15 +00:00
|
|
|
openssl-devel \
|
2022-01-28 00:54:06 +00:00
|
|
|
lz4-devel libzstd-devel xxhash-devel \
|
2019-03-19 23:01:30 +00:00
|
|
|
pkgconf python3-pkgconfig
|
|
|
|
sudo dnf install gcc gcc-c++ redhat-rpm-config
|
2020-10-10 21:12:47 +00:00
|
|
|
sudo dnf install fuse-devel fuse # needed for llfuse
|
|
|
|
sudo dnf install fuse3-devel fuse3 # needed for pyfuse3
|
2015-10-16 08:59:38 +00:00
|
|
|
|
2017-07-04 09:57:33 +00:00
|
|
|
openSUSE Tumbleweed / Leap
|
|
|
|
++++++++++++++++++++++++++
|
|
|
|
|
|
|
|
Install the dependencies automatically using zypper::
|
|
|
|
|
|
|
|
sudo zypper source-install --build-deps-only borgbackup
|
|
|
|
|
|
|
|
Alternatively, you can enumerate all build dependencies in the command line::
|
|
|
|
|
|
|
|
sudo zypper install python3 python3-devel \
|
2017-12-18 04:44:36 +00:00
|
|
|
libacl-devel openssl-devel \
|
2022-01-28 00:54:06 +00:00
|
|
|
libxxhash-devel \
|
|
|
|
python3-Cython python3-Sphinx python3-msgpack-python python3-pkgconfig pkgconf \
|
2017-07-04 09:57:33 +00:00
|
|
|
python3-pytest python3-setuptools python3-setuptools_scm \
|
2020-10-10 21:12:47 +00:00
|
|
|
python3-sphinx_rtd_theme gcc gcc-c++
|
|
|
|
sudo zypper install python3-llfuse # llfuse
|
2015-10-16 08:59:38 +00:00
|
|
|
|
2021-02-08 19:09:37 +00:00
|
|
|
macOS
|
|
|
|
+++++
|
2015-10-16 08:59:38 +00:00
|
|
|
|
2020-08-18 15:51:25 +00:00
|
|
|
When installing via Homebrew_, dependencies are installed automatically. To install
|
|
|
|
dependencies manually::
|
2015-08-01 13:07:54 +00:00
|
|
|
|
2021-02-08 19:09:37 +00:00
|
|
|
brew install python3 openssl zstd lz4 xxhash
|
2019-03-19 23:01:30 +00:00
|
|
|
brew install pkg-config
|
2022-01-28 00:54:06 +00:00
|
|
|
pip3 install virtualenv pkgconfig
|
2015-08-01 13:07:54 +00:00
|
|
|
|
2015-10-16 08:59:38 +00:00
|
|
|
For FUSE support to mount the backup archives, you need at least version 3.0 of
|
2021-02-08 19:09:37 +00:00
|
|
|
macFUSE, which is available via `github
|
|
|
|
<https://github.com/osxfuse/osxfuse/releases/latest>`__, or Homebrew::
|
2015-07-14 19:31:35 +00:00
|
|
|
|
2021-02-18 13:36:14 +00:00
|
|
|
brew install --cask macfuse
|
2018-07-07 01:46:18 +00:00
|
|
|
|
2021-02-17 14:06:46 +00:00
|
|
|
When installing Borg via ``pip``, be sure to install the ``llfuse`` extra,
|
|
|
|
since macFUSE only supports FUSE API v2. Also, since Homebrew won't link
|
|
|
|
the installed ``openssl`` formula, point pkg-config to the correct path::
|
2021-02-15 09:15:46 +00:00
|
|
|
|
2021-02-17 14:06:46 +00:00
|
|
|
PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig" pip install borgbackup[llfuse]
|
2021-02-15 03:54:21 +00:00
|
|
|
|
2020-11-15 00:39:14 +00:00
|
|
|
For OS X Catalina and later, be aware that you must authorize full disk access.
|
|
|
|
It is no longer sufficient to run borg backups as root. If you have not yet
|
|
|
|
granted full disk access, and you run Borg backup from cron, you will see
|
|
|
|
messages such as::
|
|
|
|
|
|
|
|
/Users/you/Pictures/Photos Library.photoslibrary: scandir: [Errno 1] Operation not permitted:
|
|
|
|
|
2020-12-26 20:59:10 +00:00
|
|
|
To fix this problem, you should grant full disk access to cron, and to your
|
2020-11-15 00:39:14 +00:00
|
|
|
Terminal application. More information `can be found here
|
2020-11-15 00:41:59 +00:00
|
|
|
<https://osxdaily.com/2020/04/27/fix-cron-permissions-macos-full-disk-access/>`__.
|
2016-02-20 18:24:43 +00:00
|
|
|
|
|
|
|
FreeBSD
|
|
|
|
++++++++
|
2017-07-29 09:55:26 +00:00
|
|
|
|
|
|
|
Listed below are packages you will need to install Borg, its dependencies,
|
2017-06-23 23:24:14 +00:00
|
|
|
and commands to make FUSE work for using the mount command.
|
2016-02-20 18:24:43 +00:00
|
|
|
|
|
|
|
::
|
|
|
|
|
2019-03-19 23:01:30 +00:00
|
|
|
pkg install -y python3 pkgconf
|
|
|
|
pkg install openssl
|
2022-01-28 00:54:06 +00:00
|
|
|
pkg install liblz4 zstd xxhash
|
2020-10-10 21:12:47 +00:00
|
|
|
pkg install fusefs-libs # needed for llfuse
|
2016-02-20 22:12:57 +00:00
|
|
|
pkg install -y git
|
2022-01-28 00:54:06 +00:00
|
|
|
python3 -m ensurepip # to install pip for Python3
|
2016-02-20 22:12:57 +00:00
|
|
|
To use the mount command:
|
|
|
|
echo 'fuse_load="YES"' >> /boot/loader.conf
|
|
|
|
echo 'vfs.usermount=1' >> /etc/sysctl.conf
|
|
|
|
kldload fuse
|
|
|
|
sysctl vfs.usermount=1
|
2016-07-27 13:12:52 +00:00
|
|
|
|
2016-02-20 18:24:43 +00:00
|
|
|
|
2016-12-16 23:25:49 +00:00
|
|
|
Windows 10's Linux Subsystem
|
|
|
|
++++++++++++++++++++++++++++
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
Running under Windows 10's Linux Subsystem is experimental and has not been tested much yet.
|
|
|
|
|
|
|
|
Just follow the Ubuntu Linux installation steps. You can omit the FUSE stuff, it won't work anyway.
|
|
|
|
|
|
|
|
|
2015-10-16 08:59:38 +00:00
|
|
|
Cygwin
|
2015-11-15 02:03:38 +00:00
|
|
|
++++++
|
2015-07-14 19:31:35 +00:00
|
|
|
|
2015-10-16 08:59:38 +00:00
|
|
|
.. note::
|
2017-11-05 18:24:49 +00:00
|
|
|
Running under Cygwin is experimental and has not been tested much yet.
|
2015-07-14 19:31:35 +00:00
|
|
|
|
2015-10-16 08:59:38 +00:00
|
|
|
Use the Cygwin installer to install the dependencies::
|
2015-07-16 20:40:33 +00:00
|
|
|
|
2022-01-29 00:51:23 +00:00
|
|
|
python38 python38-devel python38-pkgconfig
|
|
|
|
python38-setuptools python38-pip python38-wheel python38-virtualenv
|
|
|
|
libssl-devel libxxhash-devel liblz4-devel libzstd-devel
|
|
|
|
binutils gcc-g++ git make openssh
|
2015-07-14 19:31:35 +00:00
|
|
|
|
2015-07-25 16:38:16 +00:00
|
|
|
|
2015-10-16 08:59:38 +00:00
|
|
|
.. _pip-installation:
|
2015-07-25 16:38:16 +00:00
|
|
|
|
2015-11-16 03:20:07 +00:00
|
|
|
Using pip
|
|
|
|
~~~~~~~~~
|
2015-08-28 23:17:19 +00:00
|
|
|
|
2017-10-17 16:50:55 +00:00
|
|
|
Virtualenv_ can be used to build and install Borg without affecting
|
2015-10-16 08:59:38 +00:00
|
|
|
the system Python or requiring root access. Using a virtual environment is
|
|
|
|
optional, but recommended except for the most simple use cases.
|
2015-08-29 00:55:09 +00:00
|
|
|
|
2015-10-16 08:59:38 +00:00
|
|
|
.. note::
|
|
|
|
If you install into a virtual environment, you need to **activate** it
|
|
|
|
first (``source borg-env/bin/activate``), before running ``borg``.
|
|
|
|
Alternatively, symlink ``borg-env/bin/borg`` into some directory that is in
|
|
|
|
your ``PATH`` so you can just run ``borg``.
|
|
|
|
|
|
|
|
This will use ``pip`` to install the latest release from PyPi::
|
2015-08-29 01:39:53 +00:00
|
|
|
|
2015-08-29 00:55:09 +00:00
|
|
|
virtualenv --python=python3 borg-env
|
2015-10-16 08:59:38 +00:00
|
|
|
source borg-env/bin/activate
|
2015-08-29 00:55:09 +00:00
|
|
|
|
2020-04-17 05:53:48 +00:00
|
|
|
# might be required if your tools are outdated
|
|
|
|
pip install -U pip setuptools wheel
|
2020-10-10 21:12:47 +00:00
|
|
|
|
2022-01-28 00:54:06 +00:00
|
|
|
# pkgconfig MUST be available before borg is installed!
|
|
|
|
pip install pkgconfig
|
|
|
|
|
2015-10-16 08:59:38 +00:00
|
|
|
# install Borg + Python dependencies into virtualenv
|
2015-08-29 00:55:09 +00:00
|
|
|
pip install borgbackup
|
2016-02-07 18:15:30 +00:00
|
|
|
# or alternatively (if you want FUSE support):
|
2020-10-10 21:12:47 +00:00
|
|
|
pip install borgbackup[llfuse] # to use llfuse
|
|
|
|
pip install borgbackup[pyfuse3] # to use pyfuse3
|
2015-08-29 00:55:09 +00:00
|
|
|
|
2017-10-17 16:50:55 +00:00
|
|
|
To upgrade Borg to a new version later, run the following after
|
2015-10-16 08:59:38 +00:00
|
|
|
activating your virtual environment::
|
|
|
|
|
2020-10-10 21:12:47 +00:00
|
|
|
pip install -U borgbackup # or ... borgbackup[llfuse/pyfuse3]
|
2015-08-29 00:55:09 +00:00
|
|
|
|
2015-11-15 02:03:38 +00:00
|
|
|
.. _git-installation:
|
2015-08-28 23:17:19 +00:00
|
|
|
|
2015-11-16 03:20:07 +00:00
|
|
|
Using git
|
|
|
|
~~~~~~~~~
|
2015-08-28 23:17:19 +00:00
|
|
|
|
2015-08-29 00:55:09 +00:00
|
|
|
This uses latest, unreleased development code from git.
|
2019-08-09 21:13:11 +00:00
|
|
|
While we try not to break master, there are no guarantees on anything.
|
|
|
|
|
|
|
|
::
|
2015-08-29 01:39:53 +00:00
|
|
|
|
2015-10-13 15:25:52 +00:00
|
|
|
# get borg from github
|
|
|
|
git clone https://github.com/borgbackup/borg.git
|
2015-08-28 23:17:19 +00:00
|
|
|
|
2018-07-29 08:50:09 +00:00
|
|
|
# create a virtual environment
|
|
|
|
virtualenv --python=${which python3} borg-env
|
2015-08-28 23:17:19 +00:00
|
|
|
source borg-env/bin/activate # always before using!
|
|
|
|
|
|
|
|
# install borg + dependencies into virtualenv
|
|
|
|
cd borg
|
2015-08-29 00:55:09 +00:00
|
|
|
pip install -r requirements.d/development.txt
|
2017-07-15 13:49:55 +00:00
|
|
|
pip install -r requirements.d/docs.txt # optional, to build the docs
|
2020-10-10 21:12:47 +00:00
|
|
|
|
|
|
|
pip install -e . # in-place editable mode
|
|
|
|
or
|
|
|
|
pip install -e .[pyfuse3] # in-place editable mode, use pyfuse3
|
|
|
|
or
|
|
|
|
pip install -e .[llfuse] # in-place editable mode, use llfuse
|
2015-08-28 23:17:19 +00:00
|
|
|
|
2021-01-22 22:21:13 +00:00
|
|
|
# optional: run all the tests, on all installed Python versions
|
2015-10-16 08:59:38 +00:00
|
|
|
# requires fakeroot, available through your package manager
|
2021-01-22 22:21:13 +00:00
|
|
|
fakeroot -u tox --skip-missing-interpreters
|
2015-08-28 23:17:19 +00:00
|
|
|
|
2019-03-19 23:01:30 +00:00
|
|
|
By default the system installation of python will be used.
|
2019-08-09 21:13:11 +00:00
|
|
|
If you need to use a different version of Python you can install this using ``pyenv``:
|
|
|
|
|
|
|
|
::
|
2018-07-29 08:50:09 +00:00
|
|
|
|
|
|
|
...
|
|
|
|
# create a virtual environment
|
2022-02-25 23:13:19 +00:00
|
|
|
pyenv install 3.9.0 # minimum, preferably use something more recent!
|
|
|
|
pyenv global 3.9.0
|
|
|
|
pyenv local 3.9.0
|
2018-07-29 08:50:09 +00:00
|
|
|
virtualenv --python=${pyenv which python} borg-env
|
|
|
|
source borg-env/bin/activate # always before using!
|
|
|
|
...
|
|
|
|
|
2015-10-13 15:25:52 +00:00
|
|
|
.. note:: As a developer or power user, you always want to use a virtual environment.
|