diff --git a/doc/045_working_with_repos.rst b/doc/045_working_with_repos.rst index 00d87a450..82a20bac4 100644 --- a/doc/045_working_with_repos.rst +++ b/doc/045_working_with_repos.rst @@ -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 diff --git a/doc/manual_rest.rst b/doc/manual_rest.rst index b83a152bf..71f5e192b 100644 --- a/doc/manual_rest.rst +++ b/doc/manual_rest.rst @@ -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. -