-
Notifications
You must be signed in to change notification settings - Fork 123
[Feature Request] restore: option to skip destination scan when restoring to original paths #1706
Description
When running restore to a destination that already contains files, rustic scans the entire destination tree before writing anything, including directories the current user might not have permission to read. This causes the restore to fail even in --dry-run mode.
[ERROR] Error during collection of files: WithPath { path: "/Library/Application Support/Apple/AssetCache/Data", err: Io(Custom { kind: PermissionDenied, error: Error { depth: 5, inner: Io { path: Some("/Library/Application Support/Apple/AssetCache/Data"), err: Os { code: 13, kind: PermissionDenied, message: "Permission denied" } } } }) }
To restore profiles containing absolute paths to their original locations, the natural destination is / or a volume root. This hits system-protected directories unrelated to the backup. A workaround is to run with sudo, but that still takes too long when destination is something like /Volumes/Macintosh.
Not sure if an option to skip scanning is actually the correct approach for this project. Adjusting the scope of scanning might be more appropriate, limiting destination scan to paths present in snapshot.