What is the problem you are having with rclone?
Short version:
Chunker on Dropbox Business is leaving stray .rclone_chunk.*
files when the target directory did not exist before the transfer. This does not happen on Google Workspace.
This curiously also happens with small files way below the chunk_size threshold.
Longer version:
The problem occurs when I copy a file through a Chunker backend to Dropbox and a target directory has to be created as a result of the transfer. The files can be small and below the threshold of chunk_size = 300G
for this to occur.
What happens in the background is the first transfer fails with an error when renaming the file on the server and then rclone will transfer the file again (see full log at the end).
2023/04/06 12:06:27 ERROR : 10Mtest.file.rclone_chunk.001_p051y4: Couldn't move: move failed: from_lookup/not_found/..
2023/04/06 12:06:28 ERROR : 10Mtest.file.rclone_chunk.001_p051y4: Failed to remove temporary chunk: path_lookup/not_found/...
2023/04/06 12:06:28 ERROR : 10Mtest.file: Failed to copy: move failed: from_lookup/not_found/..
2023/04/06 12:06:28 ERROR : Attempt 1/3 failed with 1 errors and: move failed: from_lookup/not_found/..
2023/04/06 12:06:28 DEBUG : 10Mtest.file: Need to transfer - File not found at Destination
This will result in two problems.
- Every time a new directory has to be created as a result of a copy, the first file to finish copying to that directory will have to be transferred twice.
- After the transfer I am left with two files, a stale
10Mtest.file.rclone_chunk.001_p051y4
and the proper10Mtest.file
Since there is no easy way to clean this up with a multi-TB archive I will have to manually clean up the stray fiels at some point.
Sidebar:
I found this issue trying to figure out something else. I have no idea why Chunker is using temporary .rclone_chunk.*
files for transfers below the chunk_size = 300G
at all. From my understanding of the docs (emphasis mine)
When rclone starts a file upload, chunker checks the file size. If it doesn't exceed the configured chunk size, chunker will just pass the file to the wrapped remote. If a file is large, chunker will transparently cut data in pieces with temporary names and stream them one by one, on the fly.
However I'm seeing temporary .rclone_chunk.*
files created for all files regardless of size. This was my primary issue because that's where I thought my stray .rclone_chunk.*
files were coming from. That's when I found the bug above.
What I find curious is the Uploading chunk 2/1
part from the log. Aside form the fact that chunker shouldn't even engage at all with a 10M sized file.
Run the command 'rclone version' and share the full output of the command.
rclone v1.62.2-DEV
- os/version: gentoo 2.13 (64 bit)
- os/kernel: 6.1.19-gentoo (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.2
- go/linking: dynamic
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Dropbox Business. Error does not occur on Google Workspace.
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone copy 10Mtest.file DBc:/Test -vv
The rclone config contents with secrets removed.
[__DBraw]
type = dropbox
chunk_size = 128Mi
client_id = <ID>
client_secret = <SECRET>
token = <TOKEN>
[DBc]
type = chunker
remote = __DBraw:
chunk_size = 300G
A log from the command with the -vv
flag
2023/04/06 12:06:20 DEBUG : rclone: Version "v1.62.2-DEV" starting with parameters ["rclone" "copy" "10Mtest.file" "DBc:/Test" "-vv"]
2023/04/06 12:06:20 DEBUG : Creating backend with remote "10Mtest.file"
2023/04/06 12:06:20 DEBUG : Using config file from "<PATH_RO_RCLONE_CONF>"
2023/04/06 12:06:20 DEBUG : fs cache: adding new entry for parent of "10Mtest.file", "/tmp"
2023/04/06 12:06:20 DEBUG : Creating backend with remote "DBc:/Test"
2023/04/06 12:06:20 DEBUG : Creating backend with remote "__DBraw:/Test"
2023/04/06 12:06:21 DEBUG : Dropbox root '': Using root namespace "<NAMESPACE>"
2023/04/06 12:06:21 DEBUG : fs cache: renaming cache item "__DBraw:/Test" to be canonical "__DBraw:Test"
2023/04/06 12:06:21 DEBUG : Reset feature "ListR"
2023/04/06 12:06:21 DEBUG : 10Mtest.file: Need to transfer - File not found at Destination
2023/04/06 12:06:21 DEBUG : 10Mtest.file: skip slow MD5 on source file, hashing in-transit
2023/04/06 12:06:22 DEBUG : 10Mtest.file.rclone_chunk.001_p051y4: Uploading chunk 1/1
2023/04/06 12:06:25 DEBUG : 10Mtest.file.rclone_chunk.001_p051y4: Uploading chunk 2/1
2023/04/06 12:06:26 DEBUG : Dropbox root 'Test': Adding "/Test/10Mtest.file.rclone_chunk.001_p051y4" to batch
2023/04/06 12:06:26 DEBUG : Dropbox root 'Test': Batch idle for 500ms so committing
2023/04/06 12:06:26 DEBUG : Dropbox root 'Test': Committing sync batch length 1 starting with: /Test/10Mtest.file.rclone_chunk.001_p051y4
2023/04/06 12:06:27 DEBUG : Dropbox root 'Test': Committed sync batch length 1 starting with: /Test/10Mtest.file.rclone_chunk.001_p051y4
2023/04/06 12:06:27 ERROR : 10Mtest.file.rclone_chunk.001_p051y4: Couldn't move: move failed: from_lookup/not_found/..
2023/04/06 12:06:28 ERROR : 10Mtest.file.rclone_chunk.001_p051y4: Failed to remove temporary chunk: path_lookup/not_found/...
2023/04/06 12:06:28 ERROR : 10Mtest.file: Failed to copy: move failed: from_lookup/not_found/..
2023/04/06 12:06:28 ERROR : Attempt 1/3 failed with 1 errors and: move failed: from_lookup/not_found/..
2023/04/06 12:06:28 DEBUG : 10Mtest.file: Need to transfer - File not found at Destination
2023/04/06 12:06:28 DEBUG : 10Mtest.file: skip slow MD5 on source file, hashing in-transit
2023/04/06 12:06:30 DEBUG : 10Mtest.file.rclone_chunk.001_p058mv: Uploading chunk 1/1
2023/04/06 12:06:33 DEBUG : 10Mtest.file.rclone_chunk.001_p058mv: Uploading chunk 2/1
2023/04/06 12:06:34 DEBUG : Dropbox root 'Test': Adding "/Test/10Mtest.file.rclone_chunk.001_p058mv" to batch
2023/04/06 12:06:34 DEBUG : Dropbox root 'Test': Batch idle for 500ms so committing
2023/04/06 12:06:34 DEBUG : Dropbox root 'Test': Committing sync batch length 1 starting with: /Test/10Mtest.file.rclone_chunk.001_p058mv
2023/04/06 12:06:35 DEBUG : Dropbox root 'Test': Committed sync batch length 1 starting with: /Test/10Mtest.file.rclone_chunk.001_p058mv
2023/04/06 12:06:37 INFO : 10Mtest.file.rclone_chunk.001_p058mv: Moved (server-side) to: 10Mtest.file
2023/04/06 12:06:37 INFO : 10Mtest.file: Copied (new)
2023/04/06 12:06:37 ERROR : Attempt 2/3 succeeded
2023/04/06 12:06:37 INFO :
Transferred: 30 MiB / 30 MiB, 100%, 1.250 MiB/s, ETA 0s
Checks: 2 / 2, 100%
Renamed: 1
Transferred: 1 / 1, 100%
Elapsed time: 17.5s
2023/04/06 12:06:37 DEBUG : 9 go routines active
2023/04/06 12:06:37 INFO : Dropbox root 'Test': Committing uploads - please wait...