File manager - Edit - /usr/share/doc/restic/html/020_installation.html
Back
<!DOCTYPE html> <html class="writer-html5" lang="en" > <head> <meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Installation — restic 0.12.1 documentation</title> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/css/restic.css" type="text/css" /> <link rel="shortcut icon" href="_static/favicon.ico"/> <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script> <script src="_static/jquery.js"></script> <script src="_static/underscore.js"></script> <script src="_static/doctools.js"></script> <script src="_static/js/theme.js"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <link rel="next" title="Preparing a new repository" href="030_preparing_a_new_repo.html" /> <link rel="prev" title="Introduction" href="010_introduction.html" /> </head> <body class="wy-body-for-nav"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search" > <a href="index.html" class="icon icon-home"> restic <img src="_static/logo.png" class="logo" alt="Logo"/> </a> <div class="version"> 0.12.1 </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="010_introduction.html">Introduction</a></li> <li class="toctree-l1 current"><a class="current reference internal" href="#">Installation</a><ul> <li class="toctree-l2"><a class="reference internal" href="#packages">Packages</a><ul> <li class="toctree-l3"><a class="reference internal" href="#alpine-linux">Alpine Linux</a></li> <li class="toctree-l3"><a class="reference internal" href="#arch-linux">Arch Linux</a></li> <li class="toctree-l3"><a class="reference internal" href="#debian">Debian</a></li> <li class="toctree-l3"><a class="reference internal" href="#fedora">Fedora</a></li> <li class="toctree-l3"><a class="reference internal" href="#macos">macOS</a></li> <li class="toctree-l3"><a class="reference internal" href="#nix-nixos">Nix & NixOS</a></li> <li class="toctree-l3"><a class="reference internal" href="#openbsd">OpenBSD</a></li> <li class="toctree-l3"><a class="reference internal" href="#freebsd">FreeBSD</a></li> <li class="toctree-l3"><a class="reference internal" href="#opensuse">openSUSE</a></li> <li class="toctree-l3"><a class="reference internal" href="#rhel-centos">RHEL & CentOS</a></li> <li class="toctree-l3"><a class="reference internal" href="#solus">Solus</a></li> <li class="toctree-l3"><a class="reference internal" href="#windows">Windows</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="#official-binaries">Official Binaries</a><ul> <li class="toctree-l3"><a class="reference internal" href="#stable-releases">Stable Releases</a></li> <li class="toctree-l3"><a class="reference internal" href="#unstable-builds">Unstable Builds</a></li> <li class="toctree-l3"><a class="reference internal" href="#id2">Windows</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="#docker-container">Docker Container</a></li> <li class="toctree-l2"><a class="reference internal" href="#from-source">From Source</a></li> <li class="toctree-l2"><a class="reference internal" href="#autocompletion">Autocompletion</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="030_preparing_a_new_repo.html">Preparing a new repository</a></li> <li class="toctree-l1"><a class="reference internal" href="040_backup.html">Backing up</a></li> <li class="toctree-l1"><a class="reference internal" href="045_working_with_repos.html">Working with repositories</a></li> <li class="toctree-l1"><a class="reference internal" href="050_restore.html">Restoring from backup</a></li> <li class="toctree-l1"><a class="reference internal" href="060_forget.html">Removing backup snapshots</a></li> <li class="toctree-l1"><a class="reference internal" href="070_encryption.html">Encryption</a></li> <li class="toctree-l1"><a class="reference internal" href="075_scripting.html">Scripting</a></li> <li class="toctree-l1"><a class="reference internal" href="080_examples.html">Examples</a></li> <li class="toctree-l1"><a class="reference internal" href="090_participating.html">Participating</a></li> <li class="toctree-l1"><a class="reference internal" href="100_references.html">References</a></li> <li class="toctree-l1"><a class="reference internal" href="110_talks.html">Talks</a></li> <li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li> <li class="toctree-l1"><a class="reference internal" href="manual_rest.html">Manual</a></li> <li class="toctree-l1"><a class="reference internal" href="developer_information.html">Developer Information</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="index.html">restic</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="Page navigation"> <ul class="wy-breadcrumbs"> <li><a href="index.html" class="icon icon-home"></a> »</li> <li>Installation</li> <li class="wy-breadcrumbs-aside"> <a href="_sources/020_installation.rst.txt" rel="nofollow"> View page source</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <section id="installation"> <h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1> <section id="packages"> <h2>Packages<a class="headerlink" href="#packages" title="Permalink to this headline">¶</a></h2> <p>Note that if at any point the package you’re trying to use is outdated, you always have the option to use an official binary from the restic project.</p> <p>These are up to date binaries, built in a reproducible and verifiable way, that you can download and run without having to do additional installation work.</p> <p>Please see the <a class="reference internal" href="#official-binaries"><span class="std std-ref">Official Binaries</span></a> section below for various downloads. Official binaries can be updated in place by using the <code class="docutils literal notranslate"><span class="pre">restic</span> <span class="pre">self-update</span></code> command.</p> <section id="alpine-linux"> <h3>Alpine Linux<a class="headerlink" href="#alpine-linux" title="Permalink to this headline">¶</a></h3> <p>On <a class="reference external" href="https://www.alpinelinux.org">Alpine Linux</a> you can install the <code class="docutils literal notranslate"><span class="pre">restic</span></code> package from the official community repos, e.g. using <code class="docutils literal notranslate"><span class="pre">apk</span></code>:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>apk add restic </pre></div> </div> </section> <section id="arch-linux"> <h3>Arch Linux<a class="headerlink" href="#arch-linux" title="Permalink to this headline">¶</a></h3> <p>On <a class="reference external" href="https://www.archlinux.org/">Arch Linux</a>, there is a package called <code class="docutils literal notranslate"><span class="pre">restic</span></code> installed from the official community repos, e.g. with <code class="docutils literal notranslate"><span class="pre">pacman</span> <span class="pre">-S</span></code>:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>pacman -S restic </pre></div> </div> </section> <section id="debian"> <h3>Debian<a class="headerlink" href="#debian" title="Permalink to this headline">¶</a></h3> <p>On Debian, there’s a package called <code class="docutils literal notranslate"><span class="pre">restic</span></code> which can be installed from the official repos, e.g. with <code class="docutils literal notranslate"><span class="pre">apt-get</span></code>:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>apt-get install restic </pre></div> </div> </section> <section id="fedora"> <h3>Fedora<a class="headerlink" href="#fedora" title="Permalink to this headline">¶</a></h3> <p>restic can be installed using <code class="docutils literal notranslate"><span class="pre">dnf</span></code>:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>dnf install restic </pre></div> </div> <p>If you used restic from copr previously, remove the copr repo as follows to avoid any conflicts:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>dnf copr remove copart/restic </pre></div> </div> </section> <section id="macos"> <h3>macOS<a class="headerlink" href="#macos" title="Permalink to this headline">¶</a></h3> <p>If you are using macOS, you can install restic using the <a class="reference external" href="https://brew.sh/">homebrew</a> package manager:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>brew install restic </pre></div> </div> <p>You may also install it using <a class="reference external" href="https://www.macports.org/">MacPorts</a>:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>sudo port install restic </pre></div> </div> </section> <section id="nix-nixos"> <h3>Nix & NixOS<a class="headerlink" href="#nix-nixos" title="Permalink to this headline">¶</a></h3> <p>If you are using <a class="reference external" href="https://nixos.org/nix/">Nix</a> or <a class="reference external" href="https://nixos.org/">NixOS</a> there is a package available named <code class="docutils literal notranslate"><span class="pre">restic</span></code>. It can be installed using <code class="docutils literal notranslate"><span class="pre">nix-env</span></code>:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>nix-env --install restic </pre></div> </div> </section> <section id="openbsd"> <h3>OpenBSD<a class="headerlink" href="#openbsd" title="Permalink to this headline">¶</a></h3> <p>On OpenBSD 6.3 and greater, you can install restic using <code class="docutils literal notranslate"><span class="pre">pkg_add</span></code>:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp"># </span>pkg_add restic </pre></div> </div> </section> <section id="freebsd"> <h3>FreeBSD<a class="headerlink" href="#freebsd" title="Permalink to this headline">¶</a></h3> <p>On FreeBSD (11 and probably later versions), you can install restic using <code class="docutils literal notranslate"><span class="pre">pkg</span> <span class="pre">install</span></code>:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp"># </span>pkg install restic </pre></div> </div> </section> <section id="opensuse"> <h3>openSUSE<a class="headerlink" href="#opensuse" title="Permalink to this headline">¶</a></h3> <p>On openSUSE (leap 15.0 and greater, and tumbleweed), you can install restic using the <code class="docutils literal notranslate"><span class="pre">zypper</span></code> package manager:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp"># </span>zypper install restic </pre></div> </div> </section> <section id="rhel-centos"> <h3>RHEL & CentOS<a class="headerlink" href="#rhel-centos" title="Permalink to this headline">¶</a></h3> <p>restic can be installed via copr repository, for RHEL7/CentOS you can try the following:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>yum install yum-plugin-copr <span class="gp">$ </span>yum copr <span class="nb">enable</span> copart/restic <span class="gp">$ </span>yum install restic </pre></div> </div> <p>If that doesn’t work, you can try adding the repository directly, for CentOS6 use:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/copart/restic/repo/epel-6/copart-restic-epel-6.repo </pre></div> </div> <p>For CentOS7 use:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/copart/restic/repo/epel-7/copart-restic-epel-7.repo </pre></div> </div> </section> <section id="solus"> <h3>Solus<a class="headerlink" href="#solus" title="Permalink to this headline">¶</a></h3> <p>restic can be installed from the official repo of Solus via the <code class="docutils literal notranslate"><span class="pre">eopkg</span></code> package manager:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>eopkg install restic </pre></div> </div> </section> <section id="windows"> <h3>Windows<a class="headerlink" href="#windows" title="Permalink to this headline">¶</a></h3> <p>restic can be installed using <a class="reference external" href="https://scoop.sh/">Scoop</a>:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">scoop install restic</span> </pre></div> </div> <p>Using this installation method, <code class="docutils literal notranslate"><span class="pre">restic.exe</span></code> will automatically be available in the <code class="docutils literal notranslate"><span class="pre">PATH</span></code>. It can be called from cmd.exe or PowerShell by typing <code class="docutils literal notranslate"><span class="pre">restic</span></code>.</p> </section> </section> <section id="official-binaries"> <span id="id1"></span><h2>Official Binaries<a class="headerlink" href="#official-binaries" title="Permalink to this headline">¶</a></h2> <section id="stable-releases"> <h3>Stable Releases<a class="headerlink" href="#stable-releases" title="Permalink to this headline">¶</a></h3> <p>You can download the latest stable release versions of restic from the <a class="reference external" href="https://github.com/restic/restic/releases/latest">restic release page</a>. These builds are considered stable and releases are made regularly in a controlled manner.</p> <p>There’s both pre-compiled binaries for different platforms as well as the source code available for download. Just download and run the one matching your system.</p> <p>The official binaries can be updated in place using the <code class="docutils literal notranslate"><span class="pre">restic</span> <span class="pre">self-update</span></code> command (needs restic 0.9.3 or later):</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>restic version <span class="go">restic 0.9.3 compiled with go1.11.2 on linux/amd64</span> <span class="gp">$ </span>restic self-update <span class="go">find latest release of restic at GitHub</span> <span class="go">latest version is 0.9.4</span> <span class="go">download file SHA256SUMS</span> <span class="go">download SHA256SUMS</span> <span class="go">download file SHA256SUMS</span> <span class="go">download SHA256SUMS.asc</span> <span class="go">GPG signature verification succeeded</span> <span class="go">download restic_0.9.4_linux_amd64.bz2</span> <span class="go">downloaded restic_0.9.4_linux_amd64.bz2</span> <span class="go">saved 12115904 bytes in ./restic</span> <span class="go">successfully updated restic to version 0.9.4</span> <span class="gp">$ </span>restic version <span class="go">restic 0.9.4 compiled with go1.12.1 on linux/amd64</span> </pre></div> </div> <p>The <code class="docutils literal notranslate"><span class="pre">self-update</span></code> command uses the GPG signature on the files uploaded to GitHub to verify their authenticity. No external programs are necessary.</p> <div class="admonition note"> <p class="admonition-title">Note</p> <p>Please be aware that the user executing the <code class="docutils literal notranslate"><span class="pre">restic</span> <span class="pre">self-update</span></code> command must have the permission to replace the restic binary. If you want to save the downloaded restic binary into a different file, pass the file name via the option <code class="docutils literal notranslate"><span class="pre">--output</span></code>.</p> </div> </section> <section id="unstable-builds"> <h3>Unstable Builds<a class="headerlink" href="#unstable-builds" title="Permalink to this headline">¶</a></h3> <p>Another option is to use the latest builds for the master branch, available on the <a class="reference external" href="https://beta.restic.net/?sort=time&order=desc">restic beta download site</a>. These too are pre-compiled and ready to run, and a new version is built every time a push is made to the master branch.</p> </section> <section id="id2"> <h3>Windows<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3> <p>On Windows, put the <cite>restic.exe</cite> binary into <cite>%SystemRoot%\System32</cite> to use restic in scripts without the need for absolute paths to the binary. This requires administrator rights.</p> </section> </section> <section id="docker-container"> <h2>Docker Container<a class="headerlink" href="#docker-container" title="Permalink to this headline">¶</a></h2> <p>We’re maintaining a bare docker container with just a few files and the restic binary, you can get it with <cite>docker pull</cite> like this:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>docker pull restic/restic </pre></div> </div> <div class="admonition note"> <p class="admonition-title">Note</p> <div class="line-block"> <div class="line">Another docker container which offers more configuration options is</div> <div class="line">available as a contribution (Thank you!). You can find it at</div> <div class="line"><a class="reference external" href="https://github.com/Lobaro/restic-backup-docker">https://github.com/Lobaro/restic-backup-docker</a></div> </div> </div> </section> <section id="from-source"> <h2>From Source<a class="headerlink" href="#from-source" title="Permalink to this headline">¶</a></h2> <p>restic is written in the Go programming language and you need at least Go version 1.13. Building restic may also work with older versions of Go, but that’s not supported. See the <a class="reference external" href="https://golang.org/doc/install">Getting started</a> guide of the Go project for instructions how to install Go.</p> <p>In order to build restic from source, execute the following steps:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>git clone https://github.com/restic/restic <span class="go">[...]</span> <span class="gp">$ </span><span class="nb">cd</span> restic <span class="gp">$ </span>go run build.go </pre></div> </div> <p>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):</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>go run build.go --goos windows --goarch amd64 <span class="gp">$ </span>go run build.go --goos freebsd --goarch <span class="m">386</span> <span class="gp">$ </span>go run build.go --goos linux --goarch arm --goarm <span class="m">6</span> </pre></div> </div> <p>The resulting binary is statically linked and does not require any libraries.</p> <p>At the moment, the only tested compiler for restic is the official Go compiler. Building restic with gccgo may work, but is not supported.</p> </section> <section id="autocompletion"> <h2>Autocompletion<a class="headerlink" href="#autocompletion" title="Permalink to this headline">¶</a></h2> <p>Restic can write out man pages and bash/fish/zsh compatible autocompletion scripts:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>./restic generate --help <span class="go">The "generate" command writes automatically generated files (like the man pages</span> <span class="go">and the auto-completion files for bash, fish and zsh).</span> <span class="go">Usage:</span> <span class="go"> restic generate [flags] [command]</span> <span class="go">Flags:</span> <span class="go"> --bash-completion file write bash completion file</span> <span class="go"> --fish-completion file write fish completion file</span> <span class="go"> -h, --help help for generate</span> <span class="go"> --man directory write man pages to directory</span> <span class="go"> --zsh-completion file write zsh completion file</span> </pre></div> </div> <p>Example for using sudo to write a bash completion script directly to the system-wide location:</p> <div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>sudo ./restic generate --bash-completion /etc/bash_completion.d/restic <span class="go">writing bash completion file to /etc/bash_completion.d/restic</span> </pre></div> </div> <div class="admonition note"> <p class="admonition-title">Note</p> <p>The path for the <code class="docutils literal notranslate"><span class="pre">--bash-completion</span></code> option may vary depending on the operating system used, e.g. <code class="docutils literal notranslate"><span class="pre">/usr/share/bash-completion/completions/restic</span></code> in Debian and derivatives. Please look up the correct path in the appropriate documentation.</p> </div> </section> </section> </div> </div> <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> <a href="010_introduction.html" class="btn btn-neutral float-left" title="Introduction" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> <a href="030_preparing_a_new_repo.html" class="btn btn-neutral float-right" title="Preparing a new repository" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> </div> <hr/> <div role="contentinfo"> <p>© Copyright 2024, restic authors.</p> </div> Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. </footer> </div> </div> </section> </div> <script> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings