Command to check againts other remote mounts before moving

What is the problem you are having with rclone?

Say I have 6 mounts, googleteam1:, googlecrypt1: , googlecrypt2:, googlecrypt3:, dropboxcrypt1:, and dropboxcrypt2: .

  1. i would like to move files from googleteam1: to dropboxcrypt2:,
  2. I would like rclone to check if the files exist in googlecrypt1: , googlecrypt2:, googlecrypt3: and dropboxcrypt1 before proceeding to moving the files from googleteam1: to dropboxcrypt2. If the files exist, it will skip and just copy the unique files to dropboxcrypt2.

What flag would best suit this scenario?

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

rclone v1.64.2
- os/version: ubuntu 22.04 (64 bit)
- os/kernel: 6.2.0-34-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.3
- go/linking: static
- go/tags: none

check out --compare-dest, tho does not work on mount.

You could make a union and check if the file exists in the union and if not, copy the the proper location.

This is what I would do assuming that by the same files you mean files having the same path and name.

# list and sort all files from googleteam1:
rclone lsf -R googleteam1: | sort > filesSource.txt

# list, concatenate and sort all files to be checked against
rclone lsf -R googlecrypt1: > filesTmp.txt
rclone lsf -R dropboxcrypt1: >> filesTmp.txt
cat filesTmp.txt | sort > filesToCheck.txt

# only get files from googleteam1: not existing anywhere else
comm -23 filesSource.txt filesToCheck.txt > to-transfer

# copy/move files to dropboxcrypt2:
rclone copy --files-from to-transfer --no-traverse googleteam1: dropboxcrypt2:

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