From 0673b58d7cf48346910471ae0be36a800f6a8d66 Mon Sep 17 00:00:00 2001 From: Kjetil Torgrim Homme Date: Fri, 5 Dec 2025 17:50:53 +0100 Subject: [PATCH] doc: restore: explain explicitly effect of specifying snapshot:subfolder The effect could be read from the examples, but it was easy to miss. --- doc/050_restore.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/050_restore.rst b/doc/050_restore.rst index 980fa7b3d..745cb165a 100644 --- a/doc/050_restore.rst +++ b/doc/050_restore.rst @@ -50,7 +50,9 @@ This will restore the file ``foo`` to ``/tmp/restore-work/work/foo``. To only restore a specific subfolder, you can use the ``:`` syntax, where ``snapshot`` is the ID of a snapshot (or the string ``latest``) -and ``subfolder`` is a path within the snapshot. +and ``subfolder`` is a path within the snapshot. This changes the root for the +arguments to ``--include`` or ``--exclude``, they should be specified relative +to ``subfolder``. .. code-block:: console @@ -58,7 +60,7 @@ and ``subfolder`` is a path within the snapshot. enter password for repository: restoring to /tmp/restore-work -This will restore the file ``foo`` to ``/tmp/restore-work/foo``. +This will restore the file ``/work/foo`` to ``/tmp/restore-work/foo``. You can use the command ``restic ls latest`` or ``restic find foo`` to find the path to the file within the snapshot. This path you can then pass to