Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy option to keep deleted or modified files (via rclone's "--backup-dir" option) - also when syncing #182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nabemono
Copy link

@nabemono nabemono commented Nov 15, 2023

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

  • backup of deleted files (including their folder-structure)
  • backup of modified files (including their folder-structure) -> per day the last version prior the current is kept
  • when "sync" is used: keeps the target in sync without losing deleted files and also keeps files prior their modification, both in a seperate backup-folder
  • when "copy" is used: keeping files prior their modification in a seperate backup-folder

Disadvantages:

  • takes up space in the target

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

…p-dir"): 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant