Easy option to keep deleted or modified files (via rclone's "--backup-dir" option) - also when syncing #182
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I just used Android Studio and Git for the first time as I would like to contribute the following feature to the fantastic Round-Sync:
Easy option to keep deleted or modified files (via rclone's "--backup-dir" option)
Description:
If enabled - instead of being deleted or overwritten - deleted or modified files (and their folder structure) will be moved to the folder "_backup_deleted/(YYYY-MM-dd)" in the sync/copy target.
Advantages: Never loose a file
Disadvantages:
Description of "--backup-dir" (from https://rclone.org/docs/)
"When using sync, copy or move any files which would have been overwritten or deleted are moved in their original hierarchy into this directory. (...) If there is a file with the same path (...) in DIR, then it will be overwritten.
The remote in use must support server-side move or copy and you must use the same remote as the destination of the sync. The backup directory must not overlap the destination directory without it being excluded by a filter rule."
Reasons for some decisions:
The "_backup_deleted"-folder is in the target as it can always be expected to be accessible and writable. To keep it simple there is no manual selection option for the backup-folder.
The "_backup_deleted"-folder is excluded from copy/sync via "--filter"-option as it is required by rclone (see rclone's description above).
Have a nice day!
Fabian