Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: don't delete files in rclone sync without --delete flag, like rsync #8922

@walking-octopus

Description

@walking-octopus

Background

Users from other sync tools expect rclone sync to:

  1. Sync bidirectionally, mirroring changes in both directions
  2. Preserve conflicts, abort, or require interactive resolution

While documented as destructive, this expectation is reasonable -- bidirectional sync with conflict handling is standard in similar tools, including rsync's default behavior -- and will cause data loss if acted upon.

Solution

Similar to rsync -av empty:/ ~/CriticalData/ without --delete, rclone sync empty:/ ~/CriticalData can skip all delete operations and print a warning instead. It would still overwrite matching files as rsync would, as storing conflicts would seem a bit out-of-scope, but it would save users from a common footgun with minimal changes.

This would be a breaking change, but the migration would be smooth: users would notice accumulating files, read the log, and follow its instruction to add --delete, returning the dest to its expected state on rerun.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions