OneDrive EDU Error: "Failed to copy: 414 Request URI Too Long"

What is the problem you are having with rclone?

I'm making a copy of gdrive (edu) to OneDrive (edu, crypted, set up using webdev option) using sync and getting the error below.
ERROR : path/to/file: Failed to copy: 414 Request URI Too Long

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

rclone v1.54.1

  • os/arch: linux/amd64
  • go version: go1.15.8

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

Google Drive and OneDrive

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

setsid rclone sync gdrive:/folder/ OneDrive-crypted:rclone --drive-acknowledge-abuse --exclude=/eg1/1/** --exclude=/eg2/5/** --exclude=/eg3/44/** --log-file /path/to/logfile.log &>/dev/null

The rclone config contents with secrets removed.

type = crypt
remote = OneDrive:rclone
filename_encryption = standard
directory_name_encryption = true
password = *** ENCRYPTED ***

A log from the command with the -vv flag

ERROR : path/to/file: Failed to copy: 414 Request URI Too Long

Hi sync,

I suggest you:

  1. Upgrade to the latest rclone (v1.58.1)
  2. Identify the file causing the ERROR
  3. Post a full debug log showing the error when syncing just that specific file.
    You can do this by adding this to your sync command: --include="theNameOfTheErrorFile" -vv

Some additional tips:

  • You can check whether the ERROR is due to OneDrive, WebDAV or GoogleDrive by first syncing the file from GoogleDrive to local (./testfolder) and then from local to OneDrive
  • A quick guess: Could be a very long file/path name or deep folder structure - encryption increases name lengths

Let us know if it makes sense/helps or you need additional guidance.

Thanks for your insight.
It worked fine on gdrive to gdrive (or to gdrive crypt). Also works ok from gdrive to onedrive but only has a problem with onedrive crypt (All the accounts are edu). Like you mention, it seems like there's something to do with overall length of path name as some of them have very short file name (one word).

I have 100s of folders with this error but should not rename or anything. I feel like I should give up either encryption or onedrive at all?..........

Most likely, OneDrive has a 400 characters limit on the overall length of the (encrypted) path, and it easily gets very long even with short names, try this example:

rclone cryptdecode –reverse OneDrive-crypted: path/to/a/file/in/a/folder/something.txt

... or only encrypt the content and then use plain or obfuscated folder/file names:

Note we implemented a special filename_encryption mode especially for onedrive base32768 so that is the one to use for least expansion of file names.

This works, thanks. Now I have 413 Request Entity Too Large though.

Can I upload using 'Chunker' and then mount and streaming, or would it only combine the files when downloading?

Yes you can use chunker and it will stream just fine.