What is the problem you are having with rclone?
I want to use rclone sync to keep two large swift containers up to date; I want sync --checksum to use the container listing, rather than doing a HEAD on every object in the container. Despite the container listing containing correct 'hash' info, rclone is still doing a HEAD every time, which is slow.
Run the command 'rclone version' and share the full output of the command.
mvernon@ms-fe1012:~$ ./rclone version
rclone v1.58.0
- os/version: debian 11.3 (64 bit)
- os/kernel: 5.10.0-13-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.17.8
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Openstack Swift (self-hosted)
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
./rclone sync --checksum --dry-run eqiad:wikipedia-testcommons-local-public codfw:wikipedia-testcommons-local-public --include '0/01/3a1e15ca-ee52-118e-65dc-705273b6c7af.jpg' -vv --dump requests,responses --log-file=rclone-sync.log
The rclone config contents with secrets removed.
[eqiad]
type = swift
env_auth = false
user = REDACTED
key = SECRET
auth = http://ms-fe.svc.eqiad.wmnet/auth/v1.0
[codfw]
type = swift
env_auth = false
user = REDACTED
key = SECRET
auth = https://ms-fe.svc.codfw.wmnet/auth/v1.0
A log from the command with the -vv
flag
Here are the key highlights (the whole lot is a bit large to paste here), showing rclone getting a listing from the remotes, that listing containing the md5 hash, and then rclone still calling HEAD...
2022/04/21 10:33:54 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/04/21 10:33:54 DEBUG : HTTP REQUEST (req 0xc000efe200)
2022/04/21 10:33:54 DEBUG : GET /v1/AUTH_mw/wikipedia-testcommons-local-public?delimiter=%2F&format=json&limit=1000&prefix=0%2F01%2F HTTP/1.1
Host: ms-fe.svc.codfw.wmnet
User-Agent: rclone/v1.58.0
Transfer-Encoding: chunked
X-Auth-Token: XXXX
Accept-Encoding: gzip
0
2022/04/21 10:33:54 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/04/21 10:33:54 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/04/21 10:33:54 DEBUG : HTTP REQUEST (req 0xc00013f100)
2022/04/21 10:33:54 DEBUG : GET /v1/AUTH_mw/wikipedia-testcommons-local-public?delimiter=%2F&format=json&limit=1000&prefix=0%2F01%2F HTTP/1.1
Host: ms-fe.svc.eqiad.wmnet
User-Agent: rclone/v1.58.0
Transfer-Encoding: chunked
X-Auth-Token: XXXX
Accept-Encoding: gzip
0
2022/04/21 10:33:54 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/04/21 10:33:54 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/04/21 10:33:54 DEBUG : HTTP RESPONSE (req 0xc00013f100)
2022/04/21 10:33:54 DEBUG : HTTP/1.1 200 OK
Content-Length: 198
Accept-Ranges: bytes
Content-Type: application/json; charset=utf-8
Date: Thu, 21 Apr 2022 10:33:54 GMT
Last-Modified: Sat, 18 Apr 2020 00:10:57 GMT
X-Container-Bytes-Used: 1141507372
X-Container-Object-Count: 474
X-Container-Read: mw:thumbor,mw:media,.r:*
X-Container-Write: mw:thumbor,mw:media
X-Openstack-Request-Id: tx4286998d61c24aa6997dd-0062613312
X-Storage-Policy: standard
X-Timestamp: 1546886239.26298
X-Trans-Id: tx4286998d61c24aa6997dd-0062613312
[{"hash": "7461d99daf3f1e0742401ff05ed0fe0b", "last_modified": "2022-01-25T20:55:48.225080", "bytes": 1000578, "name": "0/01/3a1e15ca-ee52-118e-65dc-705273b6c7af.jpg", "content_type": "image/jpeg"}]
2022/04/21 10:33:54 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/04/21 10:33:54 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/04/21 10:33:54 DEBUG : HTTP RESPONSE (req 0xc000efe200)
2022/04/21 10:33:54 DEBUG : HTTP/1.1 200 OK
Content-Length: 198
Accept-Ranges: bytes
Content-Type: application/json; charset=utf-8
Date: Thu, 21 Apr 2022 10:33:54 GMT
Last-Modified: Sat, 18 Apr 2020 00:10:57 GMT
X-Container-Bytes-Used: 1141507372
X-Container-Object-Count: 474
X-Container-Read: mw:thumbor,mw:media,.r:*
X-Container-Write: mw:thumbor,mw:media
X-Storage-Policy: standard
X-Timestamp: 1546886239.61129
X-Trans-Id: tx663b73681cb748c290101-0062613312
[{"hash": "7461d99daf3f1e0742401ff05ed0fe0b", "last_modified": "2022-01-25T20:55:48.451190", "bytes": 1000578, "name": "0/01/3a1e15ca-ee52-118e-65dc-705273b6c7af.jpg", "content_type": "image/jpeg"}]
2022/04/21 10:33:54 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/04/21 10:33:54 DEBUG : Swift container wikipedia-testcommons-local-public: Waiting for checks to finish
2022/04/21 10:33:54 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/04/21 10:33:54 DEBUG : HTTP REQUEST (req 0xc000efe400)
2022/04/21 10:33:54 DEBUG : HEAD /v1/AUTH_mw/wikipedia-testcommons-local-public/0/01/3a1e15ca-ee52-118e-65dc-705273b6c7af.jpg HTTP/1.1
Host: ms-fe.svc.eqiad.wmnet
User-Agent: rclone/v1.58.0
Transfer-Encoding: chunked
X-Auth-Token: XXXX
0
2022/04/21 10:33:54 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/04/21 10:33:54 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/04/21 10:33:54 DEBUG : HTTP REQUEST (req 0xc00013fd00)
2022/04/21 10:33:54 DEBUG : HEAD /v1/AUTH_mw/wikipedia-testcommons-local-public/0/01/3a1e15ca-ee52-118e-65dc-705273b6c7af.jpg HTTP/1.1
Host: ms-fe.svc.codfw.wmnet
User-Agent: rclone/v1.58.0
Transfer-Encoding: chunked
X-Auth-Token: XXXX
0
2022/04/21 10:33:54 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/04/21 10:33:54 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/04/21 10:33:54 DEBUG : HTTP RESPONSE (req 0xc000efe400)
2022/04/21 10:33:54 DEBUG : HTTP/1.1 200 OK
Content-Length: 1000578
Accept-Ranges: bytes
Content-Type: image/jpeg
Date: Thu, 21 Apr 2022 10:33:54 GMT
Etag: 7461d99daf3f1e0742401ff05ed0fe0b
Last-Modified: Tue, 25 Jan 2022 20:55:49 GMT
X-Object-Meta-Sha1base36: kvcbxf34p98aldxygpsnqyusl2b5vbx
X-Openstack-Request-Id: txec2710ac9c0e4e92b6248-0062613312
X-Timestamp: 1643144148.22508
X-Trans-Id: txec2710ac9c0e4e92b6248-0062613312
2022/04/21 10:33:54 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/04/21 10:33:54 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/04/21 10:33:54 DEBUG : HTTP RESPONSE (req 0xc00013fd00)
2022/04/21 10:33:54 DEBUG : HTTP/1.1 200 OK
Content-Length: 1000578
Accept-Ranges: bytes
Content-Type: image/jpeg
Date: Thu, 21 Apr 2022 10:33:54 GMT
Etag: 7461d99daf3f1e0742401ff05ed0fe0b
Last-Modified: Tue, 25 Jan 2022 20:55:49 GMT
X-Object-Meta-Sha1base36: kvcbxf34p98aldxygpsnqyusl2b5vbx
X-Timestamp: 1643144148.45119
X-Trans-Id: tx8ce5254bc3d84835a8f13-0062613312
2022/04/21 10:33:54 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/04/21 10:33:54 DEBUG : 0/01/3a1e15ca-ee52-118e-65dc-705273b6c7af.jpg: md5 = 7461d99daf3f1e0742401ff05ed0fe0b OK
2022/04/21 10:33:54 DEBUG : 0/01/3a1e15ca-ee52-118e-65dc-705273b6c7af.jpg: Size and md5 of src and dst objects identical
2022/04/21 10:33:54 DEBUG : 0/01/3a1e15ca-ee52-118e-65dc-705273b6c7af.jpg: Unchanged skipping
Full log (secrets redacted) is here: ✎ P25943 rclone sync debug output
I think this is rclone ignoring the hash header and so deciding it must HEAD each object for an ETag; but that defeats the point of sync --checksum that I want rclone to just rely on the container listing...