powershellwindows-10onedrivecyberduck

File not found error when using cyberduck CLI for OneDrive


I want to upload encrypted backups on OneDrive using cyberduck to avoid local copys. Having a local file called file.txt I want to upload in folder Backups from OneDrive root, I used this command:

duck --username <myUser> --password <myPassword> --upload onedrive://Backups .\file.txt Transfer incomplete… File not found. /. Please contact your web hosting service provider for assistance.

It's not even possible to get the directory content using duck --username <myUser> --password <myPassword> --listonedrive://Backups command. This also cause a File not found error.

What I'm doing wrong?

I exactly followed the documentation and have no clue why this is not working. Cyberduck was installed by using chocolately, current version is Cyberduck 6.6.2 (28219)


Solution

  • Just testing this out, it looks like OneDrive sets a unique identifier for the root folder. You can find that by either inspecting the value of the cid parameter in the URL of your OneDrive site or I found it by using the following command

    duck --list OneDrive:///
    

    Note, having three slashes is important. It would appear the first two are part of the protocol name and the first specifies you want the root. The result should look like a unique id of some sort like this: 36d25d24238f8242, which you can then use to upload your files like:

    duck --upload onedrive://36d25d24238f8242/Backups .\file.txt
    

    Didn't see any of that in the docs... just tinkering with it. So I might recommend opening a bug with duck to update their docs if this works for you.