Help with Linux CLI accessing Amazon Cloud Drive

I’m having trouble accessing Amazon Cloud Drive via odrive on linux via the CLI.

So far I have linked odrive to my ACD, run the odriveagent and authenticated via "odrive authenticate " (got the success message).

Then:

mkdir /odrive

#./odrive mount /odrive /
/odrive is now synchronizing with odrive.

ls -l /odrive

total 0
-rw-r–r-- 1 root root 0 May 21 01:48 AmazonCloudDrive.cloudf

That’s as far as I’ve been able to get. Any use of the sync or backup commands fails:

./odrive backup /root/foo /odrive/

Unable to add backup folder for: /root/foo. The remote path is invalid.

The only command that seems to work is “refresh” and it doesn’t really do anything other than say “Synced”:

./odrive refresh /odrive/

Synced
.odrive
AmazonCloudDrive.cloudf

Surely it cannot be this difficult, so I assume there is just some critical step I am missing?
Thanks in advance for any advice

Hi @blazer0x,
To “expand/sync” the AmazonCloudDrive.cloudf link, use the “sync” command. So:
./odrive sync /odrive/AmazonCloudDrive.cloudf

You will use the “sync” command to sync any placeholders (.cloud or .cloudf).

Keep in mind that the backup feature in the CLI is a very early-stage version of backup. More information on that here:

Yeah I tried that, unfortunately I get an error:

./odrive sync /odrive/AmazonCloudDrive.cloudf

Unable to sync AmazonCloudDrive.cloudf. You do not have permission.

I used to use “acd_cli” to sync my Amazon Drive. It recently stopped working and it was posted that Amazon no longer allows any third-party apps to use their API - does this include odrive?

Hi @blazer0x,
We still work with Amazon Drive.

What do you see when you go to https://www.odrive.com/account/myodrive ? Are you able to browse the Amazon Drive link or does it give an error also?

Hi Tony,

Thanks for the quick reply. No errors on the web interface, I can browse the drive contents fine there. I’m not sure what is causing the permission denied error. Both the agent and client are running as root so its not filesystem related (no selinux etc either). I tried both the bundled binary as well as the straight python client, same result.

Hi @blazer0x,
Do you have any other storage account linked? If so, I would be curious to know if they show the same behavior or if you are able to sync them without an error.

Can you also try mounting the odrive folder in a subfolder instead of directly from root? Just want to make sure something funky isn’t happening there.

Hi Tony,

Nope, no other account linked, If I try to mount a subfolder, it says the path is invalid. For example, at the top level of my Amazon Drive, I have a folder called “BACKUP” (see screenshot here.

./odrive mount /odrive /BACKUP

Unable to sync /odrive The remote path is invalid.

Hi @blazer0x,
To mount a remote subfolder in Amazon the path would need to be “/AmazonCloudDrive/BACKUP/”. I was actually asking the other way though, to mount locally in a subfolder.

So something like:
./odrive mount /root/odrive /
or
./odrive mount /users/user1/odrive /

If you wanted to mount Amazon Drive directly (since its the only linked storage):
./odrive mount /root/odrive /AmazonCloudDrive/

If you wanted to mount a specific folder within Amazon:
./odrive mount /root/odrive /AmazonCloudDrive/BACKUP/

Ahhh this seems to work:

./odrive mount /root/odrive /AmazonCloudDrive/

ls /root/odrive

BACKUP.cloudf

Funny thing, I tried again with just /odrive and that worked too! Not sure what I was doing wrong before. Now to see if I can get the “backup” command to work so I can push some data in :slight_smile:

Thanks for your very helpful advice Tony!

Hi @blazer0x,
I just wanted to mention that the backup feature (as opposed to sync) that is available in the CLI is an early-access version of backup. It works, but it really should be considered a “beta” at best. Just a heads up. Since its all one-way sync, there isn’t risk in using it, but it may have some quirks.