forked from TrueCloudLab/restic
doc: improve description of caching behavior of the check command
This commit is contained in:
parent
aea7538936
commit
8dcb0c4a9d
2 changed files with 14 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -418,8 +418,6 @@ instead of the default, set the environment variable like this:
|
|||
$ restic -r /srv/restic-repo backup ~/work
|
||||
|
||||
|
||||
If the environment variable ``$RESTIC_CACHE_DIR`` is not set, ``check`` creates its temporary cache directory in the temporary directory. If ``$RESTIC_CACHE_DIR`` is set, ``check`` creates its temporary cache directory in ``$RESTIC_CACHE_DIR``.
|
||||
|
||||
.. _caching:
|
||||
|
||||
Caching
|
||||
|
@ -443,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.
|
||||
|
||||
|
@ -452,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.
|
||||
|
||||
|
|
Loading…
Reference in a new issue