From 2c37fb27ad2c24a2d134dd399f467234da600b53 Mon Sep 17 00:00:00 2001 From: Markus Kramer Date: Wed, 9 Aug 2023 10:59:56 +0200 Subject: [PATCH] dump requires absolute path from within the repo --- doc/050_restore.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/050_restore.rst b/doc/050_restore.rst index ed2ddfd40..6978acb91 100644 --- a/doc/050_restore.rst +++ b/doc/050_restore.rst @@ -156,6 +156,24 @@ e.g.: $ restic -r /srv/restic-repo dump --path /production.sql latest production.sql | mysql +For a local repository, the "Directory" path can result in the error message ``cannot dump file: path "/home" not found in snapshot`` +In this case, you can query the absolute path within the repository using the ```ls`` command: + +.. code-block:: console + + $ restic -r /srv/restic-repo ls latest / + enter password for repository: + snapshot 1541acae of [/home/other/work] filtered by [/] at 2023-08-09 04:00:03.533117139 +0200 CEST): + /work + + +and use the latter absolute path for the ``dump`` command: + +.. code-block:: console + + $ restic -r /srv/restic-repo dump latest /work/README.md + + It is also possible to ``dump`` the contents of a whole folder structure to stdout. To retain the information about the files and folders Restic will output the contents in the tar (default) or zip format: