Excluding overlapping destination

What is the problem you are having with rclone?

I am trying to sync a source directory to a destination directory which is overlapped by the source. For obvious reasons that is not possible, so I excluded the destination in a filter file using the --filter-from option. Sadly, I am still getting the "overlapping directories" error.

# drive H
- /h/dir1/**
- /h/dir2/**
- /h/dir3/**

+ /h/**

# drive X
- /x/dir1/**
- /x/dir2/**
- /x/dir3/**

+ /x/**

- /**

Run the command 'rclone version' and share the full output of the command.

rclone v1.50.2

  • os/arch: linux/amd64
  • go version: go1.13.6

Which cloud storage system are you using? (eg Google Drive)

source is a local drive and destination is a Windows network drive mounted in WSL

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone sync "/mnt" "/mnt/b/${DST}" \
	--backup-dir "/mnt/b/${BCK}" \
	--fast-list \
	--filter-from "${ROOT}/filter.txt" \
	--log-file "${LOG}/backup_${TIME}.log" \
	--log-level INFO \
	--progress \
	--transfers "${transfers}"

As you can see, the destination is exluded via my filter file.

The rclone config contents with secrets removed.

no custom config

A log from the command with the -vv flag

2022/03/04 19:33:42 ERROR : Fatal error received - not attempting retries
2022/03/04 19:33:42 Failed to sync: can't sync or move files on overlapping remotes

Unfortunately rclone isn't clever enough to notice that you've filtered the destination out when it works out that the source and destination are overlapping.

Someone noted the other day that rclone fails to look through symlinks when it does this check. We might fix that, but in the mean time you could use that "feature" to make a symlink to /mnt and use that as the source.

Do test first with --dry-run though - there is a reason rclone tries hard not to let you overlap source and destinations!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.