diff --git a/cmd/sync/sync.go b/cmd/sync/sync.go index c0c1885ba..be233cdd9 100644 --- a/cmd/sync/sync.go +++ b/cmd/sync/sync.go @@ -49,6 +49,11 @@ extended explanation in the [copy](/commands/rclone_copy/) command if unsure. If dest:path doesn't exist, it is created and the source:path contents go there. +It is not possible to sync overlapping remotes. However, you may exclude +the destination from the sync with a filter rule or by putting an +exclude-if-present file inside the destination directory and sync to a +destination that is inside the source directory. + **Note**: Use the ` + "`-P`" + `/` + "`--progress`" + ` flag to view real-time transfer statistics **Note**: Use the ` + "`rclone dedupe`" + ` command to deal with "Duplicate object/directory found in source/destination - ignoring" errors. diff --git a/docs/content/docs.md b/docs/content/docs.md index cefa65c23..ed5894726 100644 --- a/docs/content/docs.md +++ b/docs/content/docs.md @@ -582,7 +582,8 @@ been added) 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. +directory must not overlap the destination directory without it being +excluded by a filter rule. For example diff --git a/fs/fs.go b/fs/fs.go index 65d9c17d4..fe68517c4 100644 --- a/fs/fs.go +++ b/fs/fs.go @@ -40,7 +40,7 @@ var ( ErrorNotAFile = errors.New("is not a regular file") ErrorNotDeleting = errors.New("not deleting files as there were IO errors") ErrorNotDeletingDirs = errors.New("not deleting directories as there were IO errors") - ErrorOverlapping = errors.New("can't sync or move files on overlapping remotes") + ErrorOverlapping = errors.New("can't sync or move files on overlapping remotes (try excluding the destination with a filter rule)") ErrorDirectoryNotEmpty = errors.New("directory not empty") ErrorImmutableModified = errors.New("immutable file modified") ErrorPermissionDenied = errors.New("permission denied")