garethgeorge / backrest

Backrest is a web UI and orchestrator for restic backup.
GNU General Public License v3.0
1.7k stars 48 forks source link

Restoring Files and Folders to Original Location and Respect Original Permissions and Ownership #444

Open wechsler42 opened 2 months ago

wechsler42 commented 2 months ago

Hi there, thanks for providing us this great peace of restic GUI. I would like to suggest an enhanced feature for the the restore process based on the already implemented "restore to path" feature. Could you please consider to add a functionality for restoring files and folders to the original location? That means just the files and/or folders without any directory structure overhead along the path. Besides that the files and folders should have their original permissions and ownership.

davide93 commented 2 months ago

Related:

436

garethgeorge commented 2 months ago

Hey, now that https://github.com/garethgeorge/backrest/issues/436 with test coverage that asserts that files are restored in exactly the expected structure, it's looking safe to start thinking about allowing restoring on top of other folders.

This will likely be a MacOS / Linux / Docker only feature simply because I'm less confident in restic's ability (and my ability to automate...) to restore files on windows such that it doesn't trample permissions / generally mess up in-place data. It keeps things simpler to focus on good coverage for this use case on unix systems.

Restore in place is destructive so it's something I've been waiting on for a while but we're probably in a place where backrest is mature enough to do this.

Even so, most of the work in this feature is going to be in validation: