rustic icon indicating copy to clipboard operation
rustic copied to clipboard

`restore`: Differentiate between removing/changing/creating

Open aawsome opened this issue 2 years ago • 0 comments

When files/dirs are not existing, restore simply creates them. When content exists in the restore destination, but not in the snapshot, it is kept unless the --delete option is given in which case it is removed.

However, when content already exists in the destination and is present in the snapshot but differs, there are various possibilities. rustic currently does change files or dirs. Other cases like special files or mismatches in the file type (e.g. existing dir, but in snapshot it is a file) are resolved by removing and re-creating the content - IF the --delete option is given. This should be handled more transparently, e.g. by having two options --delete and --modify or --overwrite. Maybe have a look at rsync or rclone how they handle that situation.

see #561 and #565

aawsome avatar Apr 06 '23 21:04 aawsome