https://t.me/RX1948
Server : LiteSpeed
System : Linux srv104790275 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
User : dewac4139 ( 1077)
PHP Version : 8.0.30
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /usr/share/doc/restic/html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/doc/restic/html/faq.html
<!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>FAQ &mdash; 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="Manual" href="manual_rest.html" />
    <link rel="prev" title="Talks" href="110_talks.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"><a class="reference internal" href="020_installation.html">Installation</a></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 current"><a class="current reference internal" href="#">FAQ</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#will-restic-resume-an-interrupted-backup">Will restic resume an interrupted backup?</a></li>
<li class="toctree-l2"><a class="reference internal" href="#restic-check-reports-packs-that-aren-t-referenced-in-any-index-is-my-repository-broken"><code class="docutils literal notranslate"><span class="pre">restic</span> <span class="pre">check</span></code> reports packs that aren’t referenced in any index, is my repository broken?</a></li>
<li class="toctree-l2"><a class="reference internal" href="#i-ran-a-restic-command-but-it-is-not-working-as-intended-what-do-i-do-now">I ran a <code class="docutils literal notranslate"><span class="pre">restic</span></code> command but it is not working as intended, what do I do now?</a></li>
<li class="toctree-l2"><a class="reference internal" href="#how-can-i-specify-encryption-passwords-automatically">How can I specify encryption passwords automatically?</a></li>
<li class="toctree-l2"><a class="reference internal" href="#how-to-prioritize-restic-s-io-and-cpu-time">How to prioritize restic’s IO and CPU time</a></li>
<li class="toctree-l2"><a class="reference internal" href="#creating-new-repo-on-a-synology-nas-via-sftp-fails">Creating new repo on a Synology NAS via sftp fails</a></li>
<li class="toctree-l2"><a class="reference internal" href="#why-does-restic-perform-so-poorly-on-windows">Why does restic perform so poorly on Windows?</a></li>
</ul>
</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> &raquo;</li>
      <li>FAQ</li>
      <li class="wy-breadcrumbs-aside">
            <a href="_sources/faq.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="faq">
<h1>FAQ<a class="headerlink" href="#faq" title="Permalink to this headline">¶</a></h1>
<p>This is the list of Frequently Asked Questions for restic.</p>
<section id="will-restic-resume-an-interrupted-backup">
<h2>Will restic resume an interrupted backup?<a class="headerlink" href="#will-restic-resume-an-interrupted-backup" title="Permalink to this headline">¶</a></h2>
<p>Yes, restic will resume interrupted backups when they are re-run.</p>
<p>When backing up, restic periodically writes index files to keep a record of
the uploaded data. Even if there’s no snapshot created in the end (due to the
backup being interrupted), these indexes are stored in the repository for the
data that has been uploaded so far. Next time restic runs, it is then able to
find the uploaded data through these indexes, and thereby reference it again
without having to upload it a second time. This effectively makes it continue
from where it saved the last index, which should be up to a few minutes ago.</p>
<p>It does not matter if the backup was interrupted by the user or if it was due
to unforeseen circumstances such as connectivity issues, power loss, etc.
Simply re-run the backup again and restic should only upload what it needs to
in order to complete the interrupted backup and create a snapshot.</p>
<p>Note however that during the initial backup run and any re-tries, until there
has been a first snapshot created for the backup set (list of files and
directories to be backed up), restic will need to re-scan the files on disk as
there is no parent snapshot to compare the filesystem with to determine which
files have changed. This process should however be far quicker than the
uploading, and it’s normal to see restic scan the files again when re-running
the backup.</p>
</section>
<section id="restic-check-reports-packs-that-aren-t-referenced-in-any-index-is-my-repository-broken">
<h2><code class="docutils literal notranslate"><span class="pre">restic</span> <span class="pre">check</span></code> reports packs that aren’t referenced in any index, is my repository broken?<a class="headerlink" href="#restic-check-reports-packs-that-aren-t-referenced-in-any-index-is-my-repository-broken" title="Permalink to this headline">¶</a></h2>
<p>When <code class="docutils literal notranslate"><span class="pre">restic</span> <span class="pre">check</span></code> reports that there are pack files in the
repository that are not referenced in any index, that’s (in contrast to
what restic reports at the moment) not a source for concern. The output
looks like this:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ restic check
Create exclusive lock for repository
Load indexes
Check all packs
pack 819a9a52e4f51230afa89aefbf90df37fb70996337ae57e6f7a822959206a85e: not referenced in any index
pack de299e69fb075354a3775b6b045d152387201f1cdc229c31d1caa34c3b340141: not referenced in any index
Check snapshots, trees and blobs
Fatal: repository contains errors
</pre></div>
</div>
<p>The message means that there is more data stored in the repo than
strictly necessary. With high probability this is duplicate data. In
order to clean it up, the command <code class="docutils literal notranslate"><span class="pre">restic</span> <span class="pre">prune</span></code> can be used. The
cause of this bug is not yet known.</p>
</section>
<section id="i-ran-a-restic-command-but-it-is-not-working-as-intended-what-do-i-do-now">
<h2>I ran a <code class="docutils literal notranslate"><span class="pre">restic</span></code> command but it is not working as intended, what do I do now?<a class="headerlink" href="#i-ran-a-restic-command-but-it-is-not-working-as-intended-what-do-i-do-now" title="Permalink to this headline">¶</a></h2>
<p>If you are running a restic command and it is not working as you hoped it would,
there is an easy way of checking how your shell interpreted the command you are trying to run.</p>
<p>Here is an example of a mistake in a backup command that results in the command not working as expected.
A user wants to run the following <code class="docutils literal notranslate"><span class="pre">restic</span> <span class="pre">backup</span></code> command</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ restic backup --exclude &quot;~/documents&quot; ~
</pre></div>
</div>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p>This command contains an intentional user error described in this paragraph.</p>
</div>
<p>This command will result in a complete backup of the current logged in user’s home directory and it won’t exclude the folder <code class="docutils literal notranslate"><span class="pre">~/documents/</span></code> - which is not what the user wanted to achieve.
The problem is how the path to <code class="docutils literal notranslate"><span class="pre">~/documents</span></code> is passed to restic.</p>
<p>In order to spot an issue like this, you can make use of the following ruby command preceding your restic command.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ruby -e &#39;puts ARGV.inspect&#39; restic backup --exclude &quot;~/documents&quot; ~
[&quot;restic&quot;, &quot;backup&quot;, &quot;--exclude&quot;, &quot;~/documents&quot;, &quot;/home/john&quot;]
</pre></div>
</div>
<p>As you can see, the command outputs every argument you have passed to the shell. This is what restic sees when you run your command.
The error here is that the tilde <code class="docutils literal notranslate"><span class="pre">~</span></code> in <code class="docutils literal notranslate"><span class="pre">&quot;~/documents&quot;</span></code> didn’t get expanded as it is quoted.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ echo ~/documents
/home/john/documents

$ echo &quot;~/documents&quot;
~/document

$ echo &quot;$HOME/documents&quot;
/home/john/documents
</pre></div>
</div>
<p>Restic handles globbing and expansion in the following ways:</p>
<ul class="simple">
<li><p>Globbing is only expanded for lines read via <code class="docutils literal notranslate"><span class="pre">--files-from</span></code></p></li>
<li><p>Environment variables are not expanded in the file read via <code class="docutils literal notranslate"><span class="pre">--files-from</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">*</span></code> is expanded for paths read via <code class="docutils literal notranslate"><span class="pre">--files-from</span></code></p></li>
<li><p>e.g. For backup targets given to restic as arguments on the shell, neither glob expansion nor shell variable replacement is done. If restic is called as <code class="docutils literal notranslate"><span class="pre">restic</span> <span class="pre">backup</span> <span class="pre">'*'</span> <span class="pre">'$HOME'</span></code>, it will try to backup the literal file(s)/dir(s) <code class="docutils literal notranslate"><span class="pre">*</span></code> and <code class="docutils literal notranslate"><span class="pre">$HOME</span></code></p></li>
<li><p>Double-asterisk <code class="docutils literal notranslate"><span class="pre">**</span></code> only works in exclude patterns as this is a custom extension built into restic; the shell must not expand it</p></li>
</ul>
</section>
<section id="how-can-i-specify-encryption-passwords-automatically">
<h2>How can I specify encryption passwords automatically?<a class="headerlink" href="#how-can-i-specify-encryption-passwords-automatically" title="Permalink to this headline">¶</a></h2>
<p>When you run <code class="docutils literal notranslate"><span class="pre">restic</span> <span class="pre">backup</span></code>, you need to enter the passphrase on
the console. This is not very convenient for automated backups, so you
can also provide the password through the <code class="docutils literal notranslate"><span class="pre">--password-file</span></code> option, or one of
the environment variables <code class="docutils literal notranslate"><span class="pre">RESTIC_PASSWORD</span></code> or <code class="docutils literal notranslate"><span class="pre">RESTIC_PASSWORD_FILE</span></code>.
A discussion is in progress over implementing unattended backups happens in
<a class="reference external" href="https://github.com/restic/restic/issues/533">#533</a>.</p>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p>Be careful how you set the environment; using the env
command, a <cite>system()</cite> call or using inline shell
scripts (e.g. <cite>RESTIC_PASSWORD=password restic …</cite>)
might expose the credentials in the process list
directly and they will be readable to all users on a
system. Using export in a shell script file should be
safe, however, as the environment of a process is
<a class="reference external" href="https://security.stackexchange.com/questions/14000/environment-variable-accessibility-in-linux/14009#14009">accessible only to that user</a>. Please make sure that
the permissions on the files where the password is
eventually stored are safe (e.g. <cite>0600</cite> and owned by
root).</p>
</div>
</section>
<section id="how-to-prioritize-restic-s-io-and-cpu-time">
<h2>How to prioritize restic’s IO and CPU time<a class="headerlink" href="#how-to-prioritize-restic-s-io-and-cpu-time" title="Permalink to this headline">¶</a></h2>
<p>If you’d like to change the <strong>IO priority</strong> of restic, run it in the following way</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ionice -c2 -n0 ./restic -r /media/your/backup/ backup /home
</pre></div>
</div>
<p>This runs <code class="docutils literal notranslate"><span class="pre">restic</span></code> in the so-called best <em>effort class</em> (<code class="docutils literal notranslate"><span class="pre">-c2</span></code>),
with the highest possible priority (<code class="docutils literal notranslate"><span class="pre">-n0</span></code>).</p>
<p>Take a look at the <a class="reference external" href="https://linux.die.net/man/1/ionice">ionice manpage</a> to learn about the other classes.</p>
<p>To change the <strong>CPU scheduling priority</strong> to a higher-than-standard
value, use would run:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ nice --10 ./restic -r /media/your/backup/ backup /home
</pre></div>
</div>
<p>Again, the <a class="reference external" href="https://linux.die.net/man/1/nice">nice manpage</a> has more information.</p>
<p>You can also <strong>combine IO and CPU scheduling priority</strong>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ionice -c2 nice -n19 ./restic -r /media/gour/backup/ backup /home
</pre></div>
</div>
<p>This example puts restic in the IO class 2 (best effort) and tells the CPU
scheduling algorithm to give it the least favorable niceness (19).</p>
<p>The above example makes sure that the system the backup runs on
is not slowed down, which is particularly useful for servers.</p>
</section>
<section id="creating-new-repo-on-a-synology-nas-via-sftp-fails">
<h2>Creating new repo on a Synology NAS via sftp fails<a class="headerlink" href="#creating-new-repo-on-a-synology-nas-via-sftp-fails" title="Permalink to this headline">¶</a></h2>
<p>For using restic with a Synology NAS via sftp, please make sure that the
specified path is absolute, it must start with a slash (<code class="docutils literal notranslate"><span class="pre">/</span></code>).</p>
<p>Sometimes creating a new restic repository on a Synology NAS via sftp fails
with an error similar to the following:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ restic init -r sftp:user@nas:/volume1/restic-repo init
create backend at sftp:user@nas:/volume1/restic-repo/ failed:
    mkdirAll(/volume1/restic-repo/index): unable to create directories: [...]
</pre></div>
</div>
<p>Although you can log into the NAS via SSH and see that the directory structure
is there.</p>
<p>The reason for this behavior is that apparently Synology NAS expose a different
directory structure via sftp, so the path that needs to be specified is
different than the directory structure on the device and maybe even as exposed
via other protocols.</p>
<p>Try removing the <code class="docutils literal notranslate"><span class="pre">/volume1</span></code> prefix in your paths. If this does not work, use
sftp and ls to explore the SFTP file system hierarchy on your NAS.</p>
<p>The following may work:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ restic init -r sftp:user@nas:/restic-repo init
</pre></div>
</div>
</section>
<section id="why-does-restic-perform-so-poorly-on-windows">
<h2>Why does restic perform so poorly on Windows?<a class="headerlink" href="#why-does-restic-perform-so-poorly-on-windows" title="Permalink to this headline">¶</a></h2>
<p>In some cases the real-time protection of antivirus software can interfere with
restic’s operations. If you are experiencing bad performance you can try to
temporarily disable your antivirus software to find out if it is the cause for
your performance problems. If you are certain that the antivirus software is
the cause for this and you want to gain maximum performance, you have to add
the restic binary to an exclusions list within the antivirus software.</p>
</section>
</section>


           </div>
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="110_talks.html" class="btn btn-neutral float-left" title="Talks" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="manual_rest.html" class="btn btn-neutral float-right" title="Manual" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; 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>

https://t.me/RX1948 - 2025