FTP: also check mod time against upload time by default

Hello, new user here.

As far as I understand, for FTP backends rclone compares only file sizes.

Would it make sense that rclone by default also compares source file modification time to FTP destination file upload time and transfers files that are newer (even if the file sizes match)?

hello and welcome to the forum,

rclone can use the upload time as the docs state "Times you see on the FTP server through rclone are those of upload."

many servers that support ftp often also support sftp.
sftp has the concept of mod-time.

I have tested this by changing a text file (but keeping it the same file size) on my computer and then trying to sync it to FTP. I think by default this file is skipped. Am I mistaken?

The flag --update does half of what I want (it transfers files that are newer even if the file sizes matches) but, according to documentation, half of what I don't want (it skips all files that are older, even if the file size is different).

best to start a new post using the help and support template and answer the questions.
amoung other important info, it would ask you for a debug log, which would show that rclone is doing

I see that I was too reluctant in my wording, sorry. The file is definitely skipped when using just sync ("Sizes identical, Unchanged skipping").

perhaps https://rclone.org/docs/#ignore-size

--ignore-size doesn't transfer the file.

https://rclone.org/docs/#use-server-modtime

--use-server-modtime also doesn't transfer the file.

Right now, to make absolutely sure that my local files and the FTP files are in sync, I run rclone sync twice: once without --update, and once with --update.

what version of rclone?

sorry i cannot give a definite answer, gave up on ftp a long time ago.
no checksums, no mod-times.

rclone v1.55.1

Thank you for your help. I mainly wanted to see what users (and developers) would think about my suggestion in the first post.

based on the docs, seems that rclone should be able to compare the local modtime to the server upload time.

perhaps someone more knowledgeable about ftp and rclone will stop by soon.

does that server support sftp or can you install software on it such as rclone serve sftp

i wonder if rclone serve ftp supports the mod-time of the local file system?

Modtime support is generally weak across FTP servers due to ancient default format of listings and because standard protocol has NO way to change modtime of a file. FTP is ancient and limited.

We have IDEAS on how to improve situation for SOME ftp servers using non-standard protocol extensions. Probably some of them will be released this year. Even then they will require additional configuration in rclone.

In the meantime I recommend you use SFTP. It supports modtime out of the box. In most cases it supports hashsums out of the box. It's modern. Use it.

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