What is the problem you are having with rclone?
After an upgrade to the latest rclone, an rclone sync
to an encrypted OneDrive remote is attempting upload everything again rather than only the deltas. This is going to take six weeks according to rclone's ETA.
The root cause seems to be that rclone is not recognising the remote files are there when doing a sync
(but they are there when doing an ls
or sha1sum
.
I've reduced it to a sync
of a single file which copies it again, even when I know it's there.
Run the command 'rclone version' and share the full output of the command.
rclone v1.68.0
- os/version: ubuntu 22.04 (64 bit)
- os/kernel: 5.15.0-101-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.23.1
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
OneDrive (encrypted)
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
First, confirm that the file is there and the hashes match:
borg@borghost:~$ rclone sha1sum --download ~/repos/photos/data/1/1202
35b9444a8d81a795605f1a56ef1eb6c974c85027 1202
borg@borghost:~$ rclone sha1sum --download onedrive:repos/photos/data/1/1202
35b9444a8d81a795605f1a56ef1eb6c974c85027 1202
Now try to sync that file. Should be a 'nothing to do' response
borg@borghost:~$ rclone sync -vv ~/repos/photos/data/1/1202 onedrive:repos/photos/data/1202
2024/09/20 16:38:10 DEBUG : rclone: Version "v1.68.0" starting with parameters ["rclone" "sync" "-vv" "/home/borg/repos/photos/data/1/1202" "onedrive:repos/photos/data/1202"]
2024/09/20 16:38:10 DEBUG : Creating backend with remote "/home/borg/repos/photos/data/1/1202"
2024/09/20 16:38:10 DEBUG : Using config file from "/home/borg/.config/rclone/rclone.conf"
2024/09/20 16:38:10 DEBUG : fs cache: adding new entry for parent of "/home/borg/repos/photos/data/1/1202", "/home/borg/repos/photos/data/1"
2024/09/20 16:38:10 DEBUG : Creating backend with remote "onedrive:repos/photos/data/1202"
2024/09/20 16:38:10 DEBUG : Creating backend with remote "onedriveunderlying:rclonebackups/qtvah5opb18p4g4ve2i0lh4mio/vptothej6ciusdjpca3agsgj5o/u58r1pkbe9ip1vlcarj5tntqqs/vknf9rh5le44k0v06gdv2ri0ts"
2024/09/20 16:38:16 DEBUG : 1202: Need to transfer - File not found at Destination
2024/09/20 16:38:16 DEBUG : vknf9rh5le44k0v06gdv2ri0ts: Starting multipart upload
2024/09/20 16:38:17 DEBUG : vknf9rh5le44k0v06gdv2ri0ts: Uploading segment 0/147937 size 147937
2024/09/20 16:38:19 DEBUG : 1202: quickxor = 95e2ea721717a53fd19078f121bff4caeab38aea OK
2024/09/20 16:38:19 INFO : 1202: Copied (new)
2024/09/20 16:38:19 INFO :
Transferred: 144.470 KiB / 144.470 KiB, 100%, 48.156 KiB/s, ETA 0s
Transferred: 1 / 1, 100%
Elapsed time: 8.2s
Check that the file is still there, still with matching hash:
borg@borghost:~$ rclone sha1sum --download onedrive:repos/photos/data/1/1202
35b9444a8d81a795605f1a56ef1eb6c974c85027 1202
Interestingly when I do a second sync, it recognises the file is there, but then still goes and recopies it (I think):
borg@borghost:~$ rclone sync -vv ~/repos/photos/data/1/1202 onedrive:repos/photos/data/1202
2024/09/20 16:39:17 DEBUG : rclone: Version "v1.68.0" starting with parameters ["rclone" "sync" "-vv" "/home/borg/repos/photos/data/1/1202" "onedrive:repos/photos/data/1202"]
2024/09/20 16:39:17 DEBUG : Creating backend with remote "/home/borg/repos/photos/data/1/1202"
2024/09/20 16:39:17 DEBUG : Using config file from "/home/borg/.config/rclone/rclone.conf"
2024/09/20 16:39:17 DEBUG : fs cache: adding new entry for parent of "/home/borg/repos/photos/data/1/1202", "/home/borg/repos/photos/data/1"
2024/09/20 16:39:17 DEBUG : Creating backend with remote "onedrive:repos/photos/data/1202"
2024/09/20 16:39:17 DEBUG : Creating backend with remote "onedriveunderlying:rclonebackups/qtvah5opb18p4g4ve2i0lh4mio/vptothej6ciusdjpca3agsgj5o/u58r1pkbe9ip1vlcarj5tntqqs/vknf9rh5le44k0v06gdv2ri0ts"
2024/09/20 16:39:20 DEBUG : 1202: Modification times differ by -143.88454ms: 2023-02-17 21:00:17.14388454 +1100 AEDT, 2023-02-17 10:00:17 +0000 UTC
2024/09/20 16:39:20 DEBUG : vknf9rh5le44k0v06gdv2ri0ts: Starting multipart upload
2024/09/20 16:39:21 DEBUG : vknf9rh5le44k0v06gdv2ri0ts: Uploading segment 0/147937 size 147937
2024/09/20 16:39:22 DEBUG : 1202: quickxor = 8d6737714cdb2e8e583f30e796d0691e39a98b0f OK
2024/09/20 16:39:22 INFO : 1202: Copied (replaced existing)
2024/09/20 16:39:22 INFO :
Transferred: 144.470 KiB / 144.470 KiB, 100%, 72.234 KiB/s, ETA 0s
Transferred: 1 / 1, 100%
Elapsed time: 4.7s
So for some reason even when I can hash the remote file and it matches, sync
either thinks it's not there or that the mod time mismatches. In either case it looks like it is trying to do a full copy for every file, for every execution.
The rclone config contents with secrets removed.
[onedrive]
type = crypt
remote = onedriveunderlying:rclonebackups
filename_encryption = standard
directory_name_encryption = true
password = XXX
password2 = XXX
[onedriveunderlying]
type = onedrive
token = XXX
drive_id = XXX
drive_type = personal
A log from the command with the -vv
flag
Logs pasted above alongside the command.
But the interesting parts (to me) of the log files are as below. From the first sync
command:
2024/09/20 16:38:16 DEBUG : 1202: Need to transfer - File not found at Destination
...
2024/09/20 16:38:19 INFO : 1202: Copied (new)
and from the second:
2024/09/20 16:39:20 DEBUG : 1202: Modification times differ by -143.88454ms: 2023-02-17 21:00:17.14388454 +1100 AEDT, 2023-02-17 10:00:17 +0000 UTC
...
2024/09/20 16:39:22 INFO : 1202: Copied (replaced existing)