2017-04-17 18:53:38 +00:00
|
|
|
Installation
|
|
|
|
============
|
|
|
|
|
|
|
|
Packages
|
|
|
|
--------
|
|
|
|
|
|
|
|
Mac OS X
|
|
|
|
~~~~~~~~~
|
|
|
|
|
|
|
|
If you are using Mac OS X, you can install restic using the
|
2017-08-31 20:34:53 +00:00
|
|
|
`homebrew <http://brew.sh/>`__ package manager:
|
2017-04-17 18:53:38 +00:00
|
|
|
|
2017-04-17 20:43:04 +00:00
|
|
|
.. code-block:: console
|
2017-04-17 18:53:38 +00:00
|
|
|
|
|
|
|
$ brew tap restic/restic
|
|
|
|
$ brew install restic
|
|
|
|
|
2017-09-27 20:37:43 +00:00
|
|
|
Arch Linux
|
|
|
|
~~~~~~~~~~
|
2017-04-17 18:53:38 +00:00
|
|
|
|
2017-09-27 20:37:43 +00:00
|
|
|
On `Arch Linux <https://www.archlinux.org/>`__, there is a package called ``restic-git`` which can be
|
2017-04-17 18:53:38 +00:00
|
|
|
installed from AUR, e.g. with ``pacaur``:
|
|
|
|
|
2017-04-17 20:43:04 +00:00
|
|
|
.. code-block:: console
|
2017-04-17 18:53:38 +00:00
|
|
|
|
|
|
|
$ pacaur -S restic-git
|
2017-09-27 20:37:43 +00:00
|
|
|
|
|
|
|
Nix & NixOS
|
|
|
|
~~~~~~~~~~~
|
|
|
|
|
|
|
|
If you are using `Nix <https://nixos.org/nix/>`__ or `NixOS <https://nixos.org/>`__
|
|
|
|
there is a package available named ``restic``.
|
2017-09-29 08:08:24 +00:00
|
|
|
It can be installed uisng ``nix-env``:
|
2017-09-27 20:37:43 +00:00
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
$ nix-env --install restic
|
2017-04-17 18:53:38 +00:00
|
|
|
|
|
|
|
Pre-compiled Binary
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
You can download the latest pre-compiled binary from the `restic release
|
|
|
|
page <https://github.com/restic/restic/releases/latest>`__.
|
|
|
|
|
|
|
|
From Source
|
|
|
|
-----------
|
|
|
|
|
|
|
|
restic is written in the Go programming language and you need at least
|
2017-08-24 18:51:11 +00:00
|
|
|
Go version 1.8. Building restic may also work with older versions of Go,
|
2017-04-17 18:53:38 +00:00
|
|
|
but that's not supported. See the `Getting
|
|
|
|
started <https://golang.org/doc/install>`__ guide of the Go project for
|
|
|
|
instructions how to install Go.
|
|
|
|
|
|
|
|
In order to build restic from source, execute the following steps:
|
|
|
|
|
2017-04-17 20:43:04 +00:00
|
|
|
.. code-block:: console
|
2017-04-17 18:53:38 +00:00
|
|
|
|
|
|
|
$ git clone https://github.com/restic/restic
|
|
|
|
[...]
|
|
|
|
|
|
|
|
$ cd restic
|
|
|
|
|
|
|
|
$ go run build.go
|
|
|
|
|
|
|
|
You can easily cross-compile restic for all supported platforms, just
|
|
|
|
supply the target OS and platform via the command-line options like this
|
|
|
|
(for Windows and FreeBSD respectively):
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
$ go run build.go --goos windows --goarch amd64
|
|
|
|
|
|
|
|
$ go run build.go --goos freebsd --goarch 386
|
|
|
|
|
|
|
|
The resulting binary is statically linked and does not require any
|
|
|
|
libraries.
|
|
|
|
|
|
|
|
At the moment, the only tested compiler for restic is the official Go
|
|
|
|
compiler. Building restic with gccgo may work, but is not supported.
|