mirror of
https://github.com/restic/restic.git
synced 2026-05-28 04:35:41 -04:00
update docs for rewriting paths
This commit is contained in:
parent
9206625729
commit
a01938bdf3
1 changed files with 23 additions and 2 deletions
|
|
@ -378,8 +378,17 @@ Modifying metadata of snapshots
|
|||
===============================
|
||||
|
||||
Sometimes it may be desirable to change the metadata of an existing snapshot.
|
||||
Currently, rewriting the hostname and the time of the backup is supported.
|
||||
This is possible using the ``rewrite`` command with the option ``--new-host`` followed by the desired new hostname or the option ``--new-time`` followed by the desired new timestamp.
|
||||
Currently, rewriting the hostname, the time of the backup, and the stored
|
||||
paths is supported.
|
||||
|
||||
This is possible using the ``rewrite`` command with the option ``--new-host``
|
||||
followed by the desired new hostname, the option ``--new-time`` followed by
|
||||
the desired new timestamp, or the option ``--path-to`` to replace the stored
|
||||
paths.
|
||||
|
||||
When ``--path-to`` is used alone, all paths in the snapshot are replaced with
|
||||
the new path. When combined with ``--path-from``, only the matching path is
|
||||
replaced, which is useful for snapshots that contain multiple paths.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
|
|
@ -395,6 +404,18 @@ This is possible using the ``rewrite`` command with the option ``--new-host`` fo
|
|||
|
||||
modified 1 snapshots
|
||||
|
||||
To replace the stored path of a snapshot:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ restic rewrite --path-to /new/path --forget latest
|
||||
|
||||
To replace only a specific path in a multi-path snapshot:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ restic rewrite --path-from /old/path --path-to /new/path --forget latest
|
||||
|
||||
|
||||
.. _checking-integrity:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue