From 828c8bc1e8f7732ab6777c314ba5333abc15cf0c Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Mon, 26 Aug 2024 14:38:32 +0200 Subject: [PATCH] doc: describe how to handle rewrite encoding error --- doc/045_working_with_repos.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/045_working_with_repos.rst b/doc/045_working_with_repos.rst index 8dba8439f..f31e75c84 100644 --- a/doc/045_working_with_repos.rst +++ b/doc/045_working_with_repos.rst @@ -305,6 +305,13 @@ In order to preview the changes which ``rewrite`` would make, you can use the modifying the repository. Instead restic will only print the actions it would perform. +.. note:: The ``rewrite`` command verifies that it does not modify snapshots in + unexpected ways and fails with an ``cannot encode tree at "[...]" without loosing information`` + error otherwise. This can occur when rewriting a snapshot created by a newer + version of restic or some third-party implementation. + + To convert a snapshot into the format expected by the ``rewrite`` command + use ``restic repair snapshots ``. Modifying metadata of snapshots ===============================