diff --git a/doc/050_restore.rst b/doc/050_restore.rst index cab66d54a..b0ea021cc 100644 --- a/doc/050_restore.rst +++ b/doc/050_restore.rst @@ -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 =================== diff --git a/doc/manual_rest.rst b/doc/manual_rest.rst index 24a324f63..f83f07bb8 100644 --- a/doc/manual_rest.rst +++ b/doc/manual_rest.rst @@ -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: