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``
|
2018-07-07 01:46:18 +00:00
|
|
|
macOS `Brew cask`_ ``brew cask install borgbackup``
|
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
|
|
|
|
.. _FreeBSD ports: http://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
|
2016-01-13 20:18:19 +00:00
|
|
|
.. _.nix file: https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/backup/borg/default.nix
|
2016-04-09 20:19:03 +00:00
|
|
|
.. _OpenBSD ports: http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/sysutils/borgbackup/
|
2016-06-03 14:45:06 +00:00
|
|
|
.. _OpenIndiana hipster repository: http://pkg.openindiana.org/hipster/en/search.shtml?token=borg&action=Search
|
2016-04-11 08:08:16 +00:00
|
|
|
.. _openSUSE official repository: http://software.opensuse.org/package/borgbackup
|
2017-03-15 00:22:21 +00:00
|
|
|
.. _Brew cask: https://caskroom.github.io/
|
2016-06-03 14:45:06 +00:00
|
|
|
.. _Raspbian testing: http://archive.raspbian.org/raspbian/pool/main/b/borgbackup/
|
2017-03-07 13:38:45 +00:00
|
|
|
.. _Ubuntu packages: http://packages.ubuntu.com/xenial/borgbackup
|
|
|
|
.. _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.
|
|
|
|
|
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
|
|
|
|
2017-07-16 22:10:05 +00:00
|
|
|
* **Linux**: glibc >= 2.13 (ok for most supported Linux releases).
|
|
|
|
Older glibc releases are untested and may not work.
|
2016-02-04 19:48:43 +00:00
|
|
|
* **Mac OS X**: 10.10 (does not work with older OS X releases)
|
2015-10-16 08:59:38 +00:00
|
|
|
* **FreeBSD**: 10.2 (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
|
|
|
|
|
2017-10-17 16:50:55 +00:00
|
|
|
Note that the binary uses /tmp to unpack Borg with all dependencies.
|
2016-02-01 02:22:02 +00:00
|
|
|
It will fail if /tmp has not enough free space or is mounted with the ``noexec`` option.
|
2017-10-17 16:50:55 +00:00
|
|
|
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
|
|
|
|
2017-07-29 17:33:18 +00:00
|
|
|
* `Python 3`_ >= 3.5.0, plus development headers. Even though Python 3 is not
|
2016-02-18 20:30:44 +00:00
|
|
|
the default Python version on most systems, it is usually available as an
|
|
|
|
optional install.
|
|
|
|
* OpenSSL_ >= 1.0.0, plus development headers.
|
2017-07-16 22:10:05 +00:00
|
|
|
* libacl_ (which depends on libattr_), both plus development headers.
|
2017-07-29 09:55:26 +00:00
|
|
|
* ZeroMQ_ >= 4.0.0, plus development headers.
|
2017-12-18 04:44:36 +00:00
|
|
|
* We have bundled code of the following packages, but borg by default (see
|
|
|
|
setup.py if you want to change that) prefers a shared library if it can
|
|
|
|
be found on the system (lib + dev headers) at build time:
|
|
|
|
|
|
|
|
- liblz4_ >= 1.7.0 (r129)
|
|
|
|
- libzstd_ >= 1.3.0
|
|
|
|
- libb2_
|
2015-10-16 08:59:38 +00:00
|
|
|
* some Python dependencies, pip will automatically install them for you
|
|
|
|
* optionally, the llfuse_ Python package is required if you wish to mount an
|
2016-02-07 18:08:03 +00:00
|
|
|
archive as a FUSE filesystem. 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
|
|
|
|
2015-12-30 14:06:31 +00:00
|
|
|
sudo apt-get install python3 python3-dev python3-pip python-virtualenv \
|
|
|
|
libssl-dev openssl \
|
|
|
|
libacl1-dev libacl1 \
|
2017-07-29 09:55:26 +00:00
|
|
|
libzmq3-dev libzmq3 \
|
2015-12-30 14:06:31 +00:00
|
|
|
build-essential
|
2015-10-16 08:59:38 +00:00
|
|
|
sudo apt-get install libfuse-dev fuse pkg-config # optional, for FUSE support
|
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
|
|
|
|
2015-10-16 08:59:38 +00:00
|
|
|
Fedora / Korora
|
2015-11-15 02:03:38 +00:00
|
|
|
+++++++++++++++
|
2015-06-15 11:09:39 +00:00
|
|
|
|
2018-08-06 15:52:08 +00:00
|
|
|
.. todo:: use python 3.6
|
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
|
|
|
|
2015-08-28 23:17:19 +00:00
|
|
|
sudo dnf install python3 python3-devel python3-pip python3-virtualenv
|
2015-06-15 12:39:04 +00:00
|
|
|
sudo dnf install openssl-devel openssl
|
|
|
|
sudo dnf install libacl-devel libacl
|
2016-01-22 13:03:48 +00:00
|
|
|
sudo dnf install gcc gcc-c++
|
2016-04-23 08:51:38 +00:00
|
|
|
sudo dnf install redhat-rpm-config # not needed in Korora
|
2015-10-16 08:59:38 +00:00
|
|
|
sudo dnf install fuse-devel fuse pkgconfig # optional, for FUSE support
|
|
|
|
|
2017-07-04 09:57:33 +00:00
|
|
|
openSUSE Tumbleweed / Leap
|
|
|
|
++++++++++++++++++++++++++
|
|
|
|
|
2018-08-06 15:52:08 +00:00
|
|
|
.. todo:: use python 3.6
|
2017-07-29 09:55:26 +00:00
|
|
|
|
2017-07-04 09:57:33 +00:00
|
|
|
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 \
|
2017-07-04 09:57:33 +00:00
|
|
|
python3-Cython python3-Sphinx python3-msgpack-python \
|
|
|
|
python3-pytest python3-setuptools python3-setuptools_scm \
|
|
|
|
python3-sphinx_rtd_theme python3-llfuse gcc gcc-c++
|
2015-10-16 08:59:38 +00:00
|
|
|
|
|
|
|
Mac OS X
|
2015-11-15 02:03:38 +00:00
|
|
|
++++++++
|
2015-10-16 08:59:38 +00:00
|
|
|
|
2018-08-06 15:52:08 +00:00
|
|
|
.. todo:: use python 3.6
|
2017-07-29 09:55:26 +00:00
|
|
|
|
2015-10-16 08:59:38 +00:00
|
|
|
Assuming you have installed homebrew_, the following steps will install all the
|
|
|
|
dependencies::
|
2015-08-01 13:07:54 +00:00
|
|
|
|
2017-12-18 04:44:36 +00:00
|
|
|
brew install python3 openssl
|
2016-07-30 19:08:20 +00:00
|
|
|
brew install pkg-config # optional, for FUSE support
|
2015-10-16 08:59:38 +00:00
|
|
|
pip3 install virtualenv
|
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
|
2018-07-07 01:46:18 +00:00
|
|
|
FUSE for OS X, which is available via github_, or via homebrew::
|
2015-07-14 19:31:35 +00:00
|
|
|
|
2018-07-07 01:46:18 +00:00
|
|
|
brew cask install osxfuse
|
|
|
|
|
|
|
|
.. _github: https://github.com/osxfuse/osxfuse/releases/latest
|
2015-07-14 19:31:35 +00:00
|
|
|
|
2016-02-20 18:24:43 +00:00
|
|
|
|
|
|
|
FreeBSD
|
|
|
|
++++++++
|
2017-07-29 09:55:26 +00:00
|
|
|
|
2018-08-06 15:52:08 +00:00
|
|
|
.. todo:: use python 3.6
|
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
|
|
|
|
|
|
|
::
|
|
|
|
|
2017-12-18 04:44:36 +00:00
|
|
|
pkg install -y python3 openssl fusefs-libs pkgconf
|
2016-02-20 22:12:57 +00:00
|
|
|
pkg install -y git
|
|
|
|
python3.4 -m ensurepip # to install pip for Python3
|
|
|
|
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
|
|
|
|
2018-08-06 15:52:08 +00:00
|
|
|
.. todo:: use python 3.6
|
2017-07-29 09:55:26 +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
|
|
|
|
2016-11-30 01:50:20 +00:00
|
|
|
python3 python3-devel python3-setuptools
|
2016-03-21 15:11:43 +00:00
|
|
|
binutils gcc-g++
|
2015-08-29 00:55:09 +00:00
|
|
|
libopenssl openssl-devel
|
|
|
|
git make openssh
|
2015-07-14 19:31:35 +00:00
|
|
|
|
2015-10-16 08:59:38 +00:00
|
|
|
You can then install ``pip`` and ``virtualenv``::
|
2015-07-14 19:31:35 +00:00
|
|
|
|
2015-07-25 16:38:16 +00:00
|
|
|
easy_install-3.4 pip
|
2015-07-14 19:31:35 +00:00
|
|
|
pip install virtualenv
|
|
|
|
|
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
|
|
|
|
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):
|
|
|
|
pip install borgbackup[fuse]
|
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::
|
|
|
|
|
2016-02-07 18:15:30 +00:00
|
|
|
pip install -U borgbackup # or ... borgbackup[fuse]
|
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.
|
2015-10-13 15:25:52 +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
|
2016-02-07 18:15:30 +00:00
|
|
|
pip install -r requirements.d/fuse.txt # optional, for FUSE support
|
2015-08-28 23:17:19 +00:00
|
|
|
pip install -e . # in-place editable mode
|
|
|
|
|
|
|
|
# optional: run all the tests, on all supported Python versions
|
2015-10-16 08:59:38 +00:00
|
|
|
# requires fakeroot, available through your package manager
|
2015-08-28 23:17:19 +00:00
|
|
|
fakeroot -u tox
|
|
|
|
|
2018-07-29 08:50:09 +00:00
|
|
|
By default the system installation of python will be used. If you need to use a different version of Python you can install this using ``pyenv``: ::
|
|
|
|
|
|
|
|
...
|
|
|
|
# create a virtual environment
|
|
|
|
pyenv install 3.6.0
|
|
|
|
pyenv global 3.6.0
|
|
|
|
pyenv local 3.6.0
|
|
|
|
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.
|