Repository navigation
Description
Before you start
- I have searched the forum and the existing issues and this hasn't already been requested.
- I have checked the latest beta and this feature doesn't already exist.
Associated forum post URL
No response
rclone version
rclone v1.74.3
- os/version: rocky 9.8 (64 bit)
- os/kernel: 5.14.0-687.17.1.el9_8.x86_64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.26.3 (Red Hat 1.26.3-1.el9_8)
- go/linking: dynamic
- go/tags: none
What problem are you trying to solve?
1st : thank you for this nice all-in-one transfer tool, I'm using it in a lot of situations
I'm using rclone sync on an HTTP backend (nginx) with directory listing enabled
In one of my workload I have 1M+ little files with about 10% changing each day.
It works well but I think it can be optimized as rclone doesnt seem to take advantage of some features of the HTTP server.
If I make a sync with default flags (ie with head requests), rclone correctly skip unmodified files. But it needs a lot of HEAD requests, which take time.
If I disable head requests (--http-no-head) it saves a lot of time skipping head request. But in this mode rclone could not figure out if a file was updated so it syncs also unmodified files.
I know I can also use --max-age 24h but it doesnt solve my problem because it needs head request.
I conclude by looking at the code that rclone needs actual size and date of the remote files to be efficient, but need a HEAD request to get it.
How do you think rclone should be changed to solve that?
When using a basic HTTP server with directory listing enabled, files are reported WITH size and date.
So rclone may use it, instead of needing HEAD request for every file.
Here is the sample output of an nginx directory listing :
# curl https://mywebserver/jsons/
<html>
<head><title>Index of /jsons/</title></head>
<body>
<h1>Index of /jsons/</h1><hr><pre><a href="../">../</a>
<a href="A.json">A.json</a> 19-Oct-2026 09:36 7709274
<a href="H.json">H.json</a> 14-Mar-2026 15:22 1644677
<a href="Z.json">Z.json</a> 25-Feb-2026 13:28 31214068
...
Nginx can also be configured to serve this data as JSON or JSONP to ease parsing.
# curl https://mywebserver/jsons/
[
{ "name":"A.json", "type":"file", "mtime":"Mon, 19 Oct 2026 09:36:03 GMT", "size":7709274 },
{ "name":"B.json", "type":"file", "mtime":"Sat, 14 Mar 2026 15:22:09 GMT", "size":1644677 },
So, may rclone use this data as a hint to check what was updated or not ?
Once modified files list has been computed, it might remain useful to keep the HEAD request if asked because the HTTP server will have more information than datetime and size (ex: content-type). So from my POV rclone should have a new option with HTTP backend like "--trust-listing-metadata".
It could be also useful to add an if-modified-since header in the final GET request for updated file. Since rclone knows the local file datetime, it can include it in the request. Clever server will then answer "304 not modified" if date matches.
Getting involved
- I'm willing to help implement, test or fund this feature.
Activity
pladen commentedon Nov 4, 2026
Thanks @A-RYAN-1, that's awesome !
Will try to test that when I have a chance. Hope it can quickly be reviewed as well.
http: use the size and time from JSON directory listings - fixes rclo…