diff --git a/doc/040_backup.rst b/doc/040_backup.rst index 970038930..50b64ed55 100644 --- a/doc/040_backup.rst +++ b/doc/040_backup.rst @@ -416,6 +416,8 @@ environment variables. The following lists these environment variables: RESTIC_CACHE_DIR Location of the cache directory RESTIC_PROGRESS_FPS Frames per second by which the progress bar is updated + TMPDIR Location for temporary files + AWS_ACCESS_KEY_ID Amazon S3 access key ID AWS_SECRET_ACCESS_KEY Amazon S3 secret access key AWS_DEFAULT_REGION Amazon S3 default region @@ -453,12 +455,12 @@ environment variables. The following lists these environment variables: RCLONE_BWLIMIT rclone bandwidth limit -In addition to restic-specific environment variables, the following system-wide environment variables -are taken into account for various operations: +See :ref:`caching` for the rules concerning cache locations when +``RESTIC_CACHE_DIR`` is not set. - * ``$XDG_CACHE_HOME/restic``, ``$HOME/.cache/restic``: :ref:`caching`. - * ``$TMPDIR``: :ref:`temporary_files`. - * ``$PATH/fusermount``: Binary for ``restic mount``. +The external programs that restic may execute include ``rclone`` (for rclone +backends) and ``ssh`` (for the SFTP backend). These may respond to further +environment variables and configuration files; see their respective manuals. Exit status codes diff --git a/doc/cache.rst b/doc/cache.rst index 4c8009795..30b601faf 100644 --- a/doc/cache.rst +++ b/doc/cache.rst @@ -3,23 +3,13 @@ Local Cache *********** In order to speed up certain operations, restic manages a local cache of data. -This document describes the data structures for the local cache with version 1. +The location of the cache directory depends on the operating system and the +environment; see :ref:`caching`. -Versions -======== - -The cache directory is selected according to the `XDG base dir specification -`__. 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. -The cache dir for a repo contains a file named ``version``, which contains a -single ASCII integer line that stands for the current version of the cache. If -a lower version number is found the cache is recreated with the current -version. If a higher version number is found the cache is ignored and left as -is. - Snapshots, Data and Indexes =========================== diff --git a/doc/manual_rest.rst b/doc/manual_rest.rst index 224e20ea5..7e5e36adb 100644 --- a/doc/manual_rest.rst +++ b/doc/manual_rest.rst @@ -398,10 +398,14 @@ This allows faster operations, since meta data does not need to be loaded from a remote repository. The cache is automatically created, usually in an OS-specific cache folder: - * Linux/other: ``~/.cache/restic`` (or ``$XDG_CACHE_HOME/restic``) + * Linux/other: ``$XDG_CACHE_HOME/restic``, or ``~/.cache/restic`` if + ``XDG_CACHE_HOME`` is not set * macOS: ``~/Library/Caches/restic`` * Windows: ``%LOCALAPPDATA%/restic`` +If the relevant environment variables are not set, restic exits with an error +message. + The command line parameter ``--cache-dir`` or the environment variable ``$RESTIC_CACHE_DIR`` can be used to override the default cache location. The parameter ``--no-cache`` disables the cache entirely. In this case, all data