What is the problem you are having with rclone?
Union backend (onedrives) with --copy-dest enabled is slower than expected.
Run the command 'rclone version' and share the full output of the command.
rclone v1.59.0
- os/version: ubuntu 22.04 (64 bit)
- os/kernel: 5.15.0-40-generic (aarch64)
- os/type: linux
- os/arch: arm64
- go/version: go1.18.3
- go/linking: static
- go/tags: none
Which cloud storage system are you using?
sync from google drive to union (onedrive)
The rclone config contents with secrets removed.
[GoogleDrive_BackupSource]
type = drive
client_id = /
client_secret = /
scope = drive
token = /
[OneDrive_Union]
type = union
upstreams = OneDrive_01: OneDrive_02: OneDrive_03:
create_policy = epff
cache_time = 3600
[OneDrive_01]
type = onedrive
token = /
drive_id = b!
drive_type = business
client_id = /
client_secret = /
auth_url = /
token_url = /
chunk_size = 100Mi
[OneDrive_02] and [OneDrive_03] are similar with [OneDrive_01]
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
["rclone" "sync" "--config=./configs/rclone.conf" "GoogleDrive_BackupSource:/sample_folder_a" "OneDrive_Union:/sample_folder_b" "--transfers=3" "--checkers=6" "--max-backlog=2500" "--use-mmap" "--stats-log-level=NOTICE" "--stats-file-name-length=0" "--delete-during" "--fast-list" "--size-only" "-vv"]
and
["rclone" "sync" "--config=./configs/rclone.conf" "GoogleDrive_BackupSource:/sample_folder_a" "OneDrive_Union:/sample_folder_b" "--transfers=3" "--checkers=6" "--max-backlog=2500" "--use-mmap" "--copy-dest=OneDrive_Union:/sample_folder_c" "--stats-log-level=NOTICE" "--stats-file-name-length=0" "--delete-during" "--fast-list" "--size-only" "-vv"]
A log from the command with the -vv
flag
I have omitted some file name and filre directory.
- Without
copy-dest
2022/07/31 22:23:29 DEBUG : a.md5: Sizes identical
2022/07/31 22:23:29 DEBUG : a.md5: Unchanged skipping
2022/07/31 22:23:29 DEBUG : a.json: Sizes identical
2022/07/31 22:23:29 DEBUG : a.json: Unchanged skipping
...
Transferred: 6.693 MiB / 7.711 MiB, 87%, 48.677 KiB/s, ETA 21s
Checks: 4989 / 4989, 100%
Transferred: 37 / 48, 77%
Elapsed time: 3m11.1s
- With
copy-dest
enabled
2022/07/31 22:57:27 DEBUG : a12.txt: Sizes differ (src 160033 vs dst 159955)
2022/07/31 22:57:27 DEBUG : a12.txt: Destination not found in --copy-dest
2022/07/31 22:57:27 DEBUG : a12.txt: Sizes identical
2022/07/31 22:57:27 DEBUG : a12.txt: Unchanged skipping
2022/07/31 22:57:28 DEBUG : asset/[u.mp4: Sizes identical
2022/07/31 22:57:28 DEBUG : asset/[u.mp4: Sizes identical
2022/07/31 22:57:28 DEBUG : asset/[u.mp4: Unchanged skipping
2022/07/31 22:57:28 DEBUG : asset/test.md5: Sizes identical
2022/07/31 22:57:28 DEBUG : asset/test.md5: Sizes identical
2022/07/31 22:57:28 DEBUG : asset/test.md5: Unchanged skipping
2022/07/31 22:57:29 DEBUG : asset/test_index.mp4: Sizes differ (src 598248 vs dst 597764)
2022/07/31 22:57:29 DEBUG : asset/test_index.mp4: Destination not found in --copy-dest
2022/07/31 22:57:29 DEBUG : asset/test_index.mp4: Sizes identical
2022/07/31 22:57:29 DEBUG : asset/test_index.mp4: Unchanged skipping
...
Transferred: 0 B / 0 B, -, 0 B/s, ETA -
Checks: 280 / 2792, 10%
Elapsed time: 3m11.1s
The overall result is that when copy-dest is enabled, checking files is significantly slower.
Notes
I think that rclone should check existed files first and use copy-dest if they are not identical.
From the logs, I suspect that rclone is checking copy-dest first.
Meanwhile, there is also possibility of onedrive api limits, especially on uploads and server side copy, but I do not think that matters in this case.