2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-15 01:34:06 +00:00

Merge pull request #4360 from Refutable4890/master

Add an description of `check` temporary cache directory location
This commit is contained in:
Michael Eischer 2023-07-07 21:51:52 +00:00 committed by GitHub
commit 678b983300
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View File

@ -232,6 +232,8 @@ modifying the repository. Instead restic will only print the actions it would
perform.
.. _checking-integrity:
Checking integrity and consistency
==================================
@ -284,6 +286,14 @@ If the repository structure is intact, restic will show that no errors were foun
check snapshots, trees and blobs
no errors were found
By default, check creates a new temporary cache directory to verify that the
data stored in the repository is intact. To reuse the existing cache, you can
use the ``--with-cache`` flag.
If the cache directory is not explicitly set, then ``check`` creates its
temporary cache directory in the temporary directory, see :ref:`temporary_files`.
Otherwise, the specified cache directory is used, as described in :ref:`caching`.
By default, the ``check`` command does not verify that the actual pack files
on disk in the repository are unmodified, because doing so requires reading
a copy of every pack file in the repository. To tell restic to also verify the

View File

@ -418,7 +418,6 @@ instead of the default, set the environment variable like this:
$ restic -r /srv/restic-repo backup ~/work
.. _caching:
Caching
@ -442,6 +441,10 @@ The command line parameter ``--cache-dir`` or the environment variable
parameter ``--no-cache`` disables the cache entirely. In this case, all data
is loaded from the repository.
If a cache location is explicitly specified, then the ``check`` command will use
that location to store its temporary cache. See :ref:`checking-integrity` for
more details.
The cache is ephemeral: When a file cannot be read from the cache, it is loaded
from the repository.
@ -451,4 +454,3 @@ time it is used, so by looking at the timestamps of the sub directories of the
cache directory it can decide which sub directories are old and probably not
needed any more. You can either remove these directories manually, or run a
restic command with the ``--cleanup-cache`` flag.