Mac OS X¶
If you are using Mac OS X, you can install restic using the homebrew package manager:
$ brew install restic
On Arch Linux, there is a package called
which can be installed from AUR, e.g. with
$ pacaur -S restic-git
Nix & NixOS¶
If you are using Nix or NixOS
there is a package available named
It can be installed uisng
$ nix-env --install restic
On Debian, there’s a package called
restic which can be
installed from the official repos, e.g. with
$ apt-get install restic
Please be aware that, at the time of writing, Debian stable
restic version 0.3.3 which is very old. The testing and unstable
branches have recent versions of
You can download the latest pre-compiled binary from the restic release page.
restic is written in the Go programming language and you need at least Go version 1.8. Building restic may also work with older versions of Go, but that’s not supported. See the Getting started guide of the Go project for instructions how to install Go.
In order to build restic from source, execute the following steps:
$ 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.
Restic can write out a bash compatible autocompletion script:
$ ./restic autocomplete --help The "autocomplete" command generates a shell autocompletion script. NOTE: The current version supports Bash only. This should work for *nix systems with Bash installed.
By default, the file is written directly to
for convenience, and the command may need superuser rights, e.g.
$ sudo restic autocomplete Usage: restic autocomplete [flags] Flags: --completionfile string autocompletion file (default "/etc/bash_completion.d/restic.sh") Global Flags: --json set output mode to JSON for commands that support it --no-lock do not lock the repo, this allows some operations on read-only repos -o, --option key=value set extended option (key=value, can be specified multiple times) -p, --password-file string read the repository password from a file -q, --quiet do not output comprehensive progress report -r, --repo string repository to backup to or restore from (default: $RESTIC_REPOSITORY)