2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-19 19:45:18 +00:00
restic/doc/cache.rst
greatroar ae179ee63e Systematize documentation of environment variables
Cache locations were documented inconsistently in three places.

The backup docs mentioned PATH being used to find fusermount, which is
never run by restic backup. It now mentions ssh and rclone, which are
used by backends.

The notion of a "system-wide" environment variable makes no sense.
TMPDIR is now mentioned because it allows for optimization and may
have security implications.
2020-10-22 09:57:30 +02:00

27 lines
938 B
ReStructuredText

***********
Local Cache
***********
In order to speed up certain operations, restic manages a local cache of data.
The location of the cache directory depends on the operating system and the
environment; see :ref:`caching`.
Each repository has its own cache sub-directory, consisting of the repository ID
which is chosen at ``init``. All cache directories for different repos are
independent of each other.
Snapshots, Data and Indexes
===========================
Snapshot, Data and Index files are cached in the sub-directories ``snapshots``,
``data`` and ``index``, as read from the repository.
Expiry
======
Whenever a cache directory for a repo is used, that directory's modification
timestamp is updated to the current time. By looking at the modification
timestamps of the repo cache directories it is easy to decide which directories
are old and haven't been used in a long time. Those are probably stale and can
be removed.