diff --git a/changelogs/unreleased/9221-kaovilai b/changelogs/unreleased/9221-kaovilai new file mode 100644 index 000000000..61f56996f --- /dev/null +++ b/changelogs/unreleased/9221-kaovilai @@ -0,0 +1 @@ +docs: Add documentation about --write-sparse-files flag for disk space issues during restore diff --git a/site/content/docs/main/file-system-backup.md b/site/content/docs/main/file-system-backup.md index 907fc08e8..0cfd74bf5 100644 --- a/site/content/docs/main/file-system-backup.md +++ b/site/content/docs/main/file-system-backup.md @@ -602,6 +602,12 @@ To understand which backup method was used for your volumes: **Note:** A volume appearing in the "skipped PVs" summary doesn't mean it wasn't backed up - it may have been backed up via volume snapshot instead. +### Disk space issues during restore + +If restores fail due to "no space left on device" errors, the `--write-sparse-files` option may help in specific scenarios. However, this only works if the persistent volume had sparse files during backup that would free up enough space for the restore process. If the volume doesn't contain sparse files, this option will not resolve the disk space issue. + +For more information, see [Write Sparse files](restore-reference.md#write-sparse-files) in the restore documentation. + ## Backup Method Decision Flow When Velero encounters a volume during backup, it follows this decision flow: diff --git a/site/content/docs/main/troubleshooting.md b/site/content/docs/main/troubleshooting.md index df5d71753..e58fbad29 100644 --- a/site/content/docs/main/troubleshooting.md +++ b/site/content/docs/main/troubleshooting.md @@ -250,6 +250,24 @@ To resolve it, please use Kopia maintenance CLI to set the ownership correctly, Please refer to [Issue 9007](https://github.com/velero-io/velero/issues/9007) for more information. +## Disk space issues during restore + +If you encounter "no space left on device" errors during restore, the `--write-sparse-files` flag may help in certain scenarios. + +Example error message: +``` +Velero: pod volume restore failed: error restoring volume: error creating .velero directory for done file: mkdir /host_pods/60880bf2-9d1c-47cf-ba8f-5f8db43b385b/volumes/kubernetes.io~csi/pvc-ee79e0f0-ed62-44f7-987e-16efca1d1cd5/mount/.velero: no space left on device +``` + +**Important Limitation**: The `--write-sparse-files` flag only works if the persistent volume had sparse files during backup that would free up enough space for the done file. If the volume doesn't contain sparse files, this option will not resolve the disk space issue. + +To try using sparse files during restore: +```bash +velero restore create --from-backup --write-sparse-files +``` + +See [Write Sparse files](restore-reference.md#write-sparse-files) for more details on using this option. + [1]: debugging-restores.md [2]: debugging-install.md [3]: file-system-backup.md