Verify all files exist somewhere on remote, regardless of structure

Every once in a while, I make a manual copy of my latest photos to my backup NAS over FTP. I've been using folders like 'photos until feb 2025' that don't exist locally. So my source directory structure differs from the destination/backup structure.

When deleting files locally, I want to verify these files exist remotely, regardless of directory. So I'm looking for a recursive remote rclone check with a list of local files (ideally also recursive).

Is this already possible with rclone?

welcome to the forum,

verify by filename, size, hash or what?

Name and size would be sufficient. I'm now considering doing a local and remote rclone ls and use a bash/python script from there.

yeah, that is what i would do.


another option is to rclone mount the FTP server and then use any dedupe tool to compare local source and mounted remote dest.

1 Like

This is what I ended up with to solve the problem above.
https://codefile.io/f/85h62xCXul

A few notes:

  • Compares source to backup based on file name and size. Reports any file from source missing in backup.
  • No proper error handling
  • lsjson would probably be a better way to go
  • I'm not a coder, so don't shoot me :slight_smile: