Can't copy some files from remote to local drive

What is the problem you are having with rclone?

I've made backups of a hard drive from a Windows machine to a Google remote and now I'm restoring the same backup to a hard drive on a Windows machine. The machine does support long paths but I keep getting errors with some files that have pretty long filenames, the errors (even when I enable debug) only say:

Failed to copy: El nombre de archivo, el nombre de directorio o la sintaxis de la etiqueta del volumen no son correctos.

Which means:

Failed to copy:  The file name, directory name or volume label syntax is not correct

How should I restore these files?

Run the command 'rclone version' and share the full output of the command.

rclone v1.66.0
- os/version: Microsoft Windows 10 IoT Enterprise LTSC 2021 21H2 (64 bit)
- os/kernel: 10.0.19044.4291 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.22.1
- go/linking: static
- go/tags: cmount

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone copy "Crypt:Drive (X:)" X:\ --no-update-modtime --transfers 10 --checkers 15 --contimeout 60s --timeout 300s --retries 5 --low-level-retries 10 --links --create-empty-src-dirs --stats-file-name-length 0 --fast-list --progress

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

Paste config here

A log from the command that you were trying to run with the -vv flag

2024/04/24 18:27:09 DEBUG : Creating backend with remote "Crypt:Drive (X:)"
2024/04/24 18:27:09 DEBUG : Using config file from "C:\\rclone\\rclone.conf"
2024/04/24 18:27:09 DEBUG : Creating backend with remote "REDACTED:REDACTED/redacted"
2024/04/24 18:27:10 DEBUG : Google drive root 'REDACTED/redacted': 'root_folder_id = redacted' - save this in the config to speed up startup
2024/04/24 18:27:11 DEBUG : Creating backend with remote "X:\\"
2024/04/24 18:27:11 DEBUG : local: detected overridden config - adding "{b6816}" suffix to name
2024/04/24 18:27:11 DEBUG : fs cache: renaming cache item "X:\\" to be canonical "local{b6816}://?/X:/"
2024/04/24 18:28:35 DEBUG : Google drive root 'REDACTED/redacted': Disabling ListR to work around bug in drive as multi listing (50) returned no entries
2024/04/24 18:28:35 DEBUG : Google drive root 'REDACTED/redacted': Recycled 50 entries
...
...
...
2024/04/24 18:31:12 ERROR : xxxyzxxxxx/560laDACB2FtY9wd-NB6eJv-vlHXI8JGvCiJ63OVlqf6mXLbVa4unNyXzit9YHSC-cuoAzDtkeVMAhTGS2POCSNh0RjBRV_FNZcwCezgIpxPRqYxw7-w_ijAqcPL7Olv1sEe60n2uvjES34HFcwwEkn_jBtkTUFNnM1QAqOjjuGbbZlYtN0fLaGzLDFjvIJwo_6aJeMjgE6g3KWf813uO7oF7v_cldGBMDdG3znI6OL.ext: Failed to copy: El nombre de archivo, el nombre de directorio o la sintaxis de la etiqueta del volumen no son correctos.

(That is the actual name of the file)

I've tried manually creating the file in the same subdirectory without problems. I don't understand why it fails

perhaps the slash is part of the problem?

There xxxyzxxxxx is a subdirectory, full path would be:

X:\xxxyzxxxxx\560laDACB2FtY9wd-NB6eJv-vlHXI8JGvCiJ63OVlqf6mXLbVa4unNyXzit9YHSC-cuoAzDtkeVMAhTGS2POCSNh0RjBRV_FNZcwCezgIpxPRqYxw7-w_ijAqcPL7Olv1sEe60n2uvjES34HFcwwEkn_jBtkTUFNnM1QAqOjjuGbbZlYtN0fLaGzLDFjvIJwo_6aJeMjgE6g3KWf813uO7oF7v_cldGBMDdG3znI6OL.ext

I've successfully manually created a file with the same full path

It's really weird to me because there are a lot of other files that have also long paths that were copied without problems, it's failing with only ~50 files

i reproduced the issue and worked around the error by using --inplace

C:\data\rclone\zork>..\rclone copy . d:\folder --retries=1
2024/04/24 20:27:12 ERROR : 560laDACB2FtY9wd-NB6eJv-vlHXI8JGvCiJ63OVlqf6mXLbVa4unNyXzit9YHSC-cuoAzDtkeVMAhTGS2POCSNh0RjBRV_FNZcwCezgIpxPRqYxw7-w_ijAqcPL7Olv1sEe60n2uvjES34HFcwwEkn_jBtkTUFNnM1QAqOjjuGbbZlYtN0fLaGzLDFjvIJwo_6aJeMjgE6g3KWf813uO7oF7v_cldGBMDdG3znI6OL.ext: Failed to copy: The filename, directory name, or volume label syntax is incorrect.
2024/04/24 20:27:12 ERROR : Attempt 1/1 failed with 1 errors and: The filename, directory name, or volume label syntax is incorrect.
2024/04/24 20:27:12 Failed to copy: The filename, directory name, or volume label syntax is incorrect.

C:\data\rclone\zork>..\rclone copy . d:\folder --retries=1 -v --inplace
2024/04/24 20:27:18 INFO  : 560laDACB2FtY9wd-NB6eJv-vlHXI8JGvCiJ63OVlqf6mXLbVa4unNyXzit9YHSC-cuoAzDtkeVMAhTGS2POCSNh0RjBRV_FNZcwCezgIpxPRqYxw7-w_ijAqcPL7Olv1sEe60n2uvjES34HFcwwEkn_jBtkTUFNnM1QAqOjjuGbbZlYtN0fLaGzLDFjvIJwo_6aJeMjgE6g3KWf813uO7oF7v_cldGBMDdG3znI6OL.ext: Copied (new)
2024/04/24 20:27:18 INFO  :
Transferred:       46.500 KiB / 46.500 KiB, 100%, 0 B/s, ETA -
Transferred:            1 / 1, 100%
Elapsed time:         0.0s
1 Like

Thank you, will try this right now and see how it goes. Any idea of why it fails without using inplace? Even when it doesn't with other long path names?

no, not yet. but should not be an issue with gdrive, or crypt remote.

so try --inplace and then let's see that happens?

1 Like

It all went well, all the missing files have been copied now, inplace worked

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.