2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-22 10:58:55 +00:00

Merge pull request #4138 from MichaelEischer/doc-sparse

doc: add description for restore --sparse
This commit is contained in:
rawtaz 2023-01-10 23:39:51 +01:00 committed by GitHub
commit dffb8e0c14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -60,6 +60,14 @@ Restoring symbolic links on windows is only possible when the user has
``SeCreateSymbolicLinkPrivilege`` privilege or is running as admin. This is a
restriction of windows not restic.
By default, restic does not restore files as sparse. Use ``restore --sparse`` to
enable the creation of sparse files if supported by the filesystem. Then restic
will restore long runs of zero bytes as holes in the corresponding files.
Reading from a hole returns the original zero bytes, but it does not consume
disk space. Note that the exact location of the holes can differ from those in
the original file, as their location is determined while restoring and is not
stored explicitly.
Restore using mount
===================

View File

@ -258,7 +258,10 @@ Metadata handling
~~~~~~~~~~~~~~~~~
Restic saves and restores most default attributes, including extended attributes like ACLs.
Sparse files are not handled in a special way yet, and aren't restored.
Information about holes in a sparse file is not stored explicitly, that is during a backup
the zero bytes in a hole are deduplicated and compressed like any other data backed up.
Instead, the restore command optionally creates holes in files by detecting and replacing
long runs of zeros, in filesystems that support sparse files.
The following metadata is handled by restic: