Local to remote syncing problems

odrive Make Cloud Storage THE WAY IT SHOULD BE.

isActivated: True … hasSession: True
email: bmff.engagement@gmail.com … accountType: Google
syncEnabled: True … version: prod 924
placeholderThreshold: neverDownload … autoUnsyncThreshold: never
downloadThrottlingThreshold: unlimited … uploadThrottlingThreshold: normal
autoTrashThreshold: never … Mounts: 1
xlThreshold: never … Backups: 0

Sync Requests: 0
Background Requests: 0
Uploads: 0
Downloads: 0
Trash: 0
Waiting: 0
Not Allowed: 5

That ‘not allowed’ doesn’t look good.

Hi @bmff.engagement,
If you use the status --not_allowed command you can see why those files are not allowed.

/home/paul/C/Admin - The file/folder could not be modified.
/home/paul/C/Governance - The file/folder could not be modified.
/home/paul/C/Project - The file/folder could not be modified.
/home/paul/C/Forum - The file/folder could not be modified.
/home/paul/C/test180823.txt - Files/folders cannot be uploaded to this folder.

I tried setting permissions so that anyone can modify, but no change. The last item is a small text file I created as a test.

A thought: I am currently running Dropbox, investigating odrive because Dropbox will stop working in November. The ‘C’ directory is not part of the current Dropbox setup, but could there be some issue with running both at the same time?

Hi @bmff.engagement,
Can you show me what this command shows?
status --mounts

Do you know what your mount command was (is it in your history)?

The mount command was:
“$HOME/.odrive-agent/bin/odrive” mount “$HOME/C” /

The result of status --mounts is:

/home/paul/C status:Active
status:None

Hi @bmff.engagement,
It looks like you mounted C to the root of the odrive drive. This is what is preventing upload, since the root of odrive is a collection of storage, but isn’t actually backed by any storage, itself.

You would need to add your items into C/Google Drive (or whatever the name of your Google Drive is). Alternatively, you could remove that existing mount and then mount C to your linked Google Drive using a command like: mount "$HOME/C" "/Google Drive". That should give you the effect you want.

I can’t find the name of my Google Drive. It seems to call itself ‘Drive’ or ‘My Drive’,

Again, it feels like I’m missing something. The Google Drive is cloud storage, so it doesn’t appear anywhere on my filesystem. That is what I’m wanting to use odrive for, so that directories and files in the Google Drive will also be present on my local filesystem.

Hi @bmff.engagement,
What do you see listed when you go to https://www.odrive.com/account/myodrive ? That will show the storage you have linked. What you see in there should show up as a .cloudf placeholder file in “$HOME/C”, currently, if you still have it mounted as you posted earlier.

Thanks: that works. It seems to be up and running now.

If you don’t mind, a few other questions. I can raise them as new topics if you prefer …

  • Can I change the “Google Drive” name?
  • Do I need to restart odrive from the command line every time I reboot?
  • If I want to use odrive to sync my Dropbox files, I assume I first need to stop syncing with Dropbox. Am I right?

Thanks again.

Hi @bmff.engagement,
You can change the name of the linked drives. The best way is to do it from the odrive web client (https://www.odrive.com/account/myodrive)

You will need to have the agent started. Some folks have created a systemd service to autostart the agent on startup.

You do not need to stop using the Dropbox client to use odrive, but you will not want both clients acting on the same local storage. Once you are comfortable and happy with odrive you can stop using the Dropbox client. If you continue to use both you can end up with duplicate data, locally, since you are syncing with two different client in two different locations.

Thanks.

So if I mount to $HOME instead of $HOME/C, I could then change ‘Google Drive’ to ‘C’ and have the contents of my Google Drive appear in $HOME/C?

However, before I change anything, it seems the sync is not working after all. I place a file in the Google Drive and I get (I assume) a placeholder file, 0 bytes and with the ‘.cloud’ extension added to the end of the file name appearing on my local drive. I add a folder to Google Drive and I get a placeholder with the ‘.cloudf’ extension. I can’t open the file or navigate into the folder, which is not what I expect from the description.

Hi @bmff.engagement,
You can mount your C folder directly to the Google Drive remote folder by using a command like:
mount "$HOME/C" "/Google Drive". I think this will set it up the way you want without having to rename things.

The .cloud and .cloudf files are placeholders that need to be downloaded/expanded if you want to work on them locally. In their placeholder form they represent what is in the cloud. To download/expand you use the sync command.

You can use a one-line script to perform a recursive download (expand and download everything in the chosen , expanded folder). See here for more details:

Thanks. Presumably I need to unmount first.

“unmount -h” to get the syntax right?

Is there a command to see exactly what is mounted at present? Status doesn’t seem to do that.

Hi @bmff.engagement,
That is right.

usage: odrive.py unmount [-h] localPath

positional arguments:
  localPath   local path of the mount

The status --mounts will show you the current mounts.

Thinking about it a bit more … are you saying that each time something gets added to the cloud storage, I need to run a sync command from the local machine to ensure that I am in step locally?

I am trying to set this up so I can use ocloud as a replacement for Dropbox. What I can do with Dropbox (until it stops working!) is to create, modify or delete anything in or under the specified directory on any of the computers I have linked, and Dropbox ensures that next time I connect to the Internet on any other machine, that machine will be brought in step with the latest version of all files, without me needing to issue any commands. Can ocloud enable me to set up this functionality, or do I need to keep looking? The main functional difference, as I understood it, was that Dropbox supplied the cloud storage which everything synced with, and I have to supply the cloud storage for ocloud which is fine as I can use my Google Drive account for this.

If I need to run a command every time a file is updated anywhere to ensure the machines stay in sync, the danger is that I will forget and get in a terrible mess with version control.

Hi @bmff.engagement,

New files/folders will be shown as placeholders (.cloud/.cloudf files )on odrive until you decide to sync them. So, you will see that they exist, but if you want to interact with them locally you will need to tell odrive to sync them, at least once.

Existing files that have already been synced locally will be automatically updated to the newer version, if there is a remote change. This means you don’t need to do anything to get the latest version of a file you have already chosen to sync on that system.

Okay, it’s working as you describe in one machine. So I try to install on a second machine. If it matters, this one is running Lubuntu, just a version of Linux. I download the files successfully, can see them in the .odrive-agent/bin directory, file permissions are fine. But when I try to run the nohup command, copied from your web site, to start odrive I get a “No such file or directory” error. Even when I navigate to the bin directory and try to run the command directly in the terminal, even when I find the program using auto-completion, I still get the same error message. I guess the program is looking for something else, but I can’t work out what?

Sorry to be a pain!

Hi @bmff.engagement,
No worries! This sounds like an odd issue.

Can you take a screenshot of the attempt to run the command directly?
Can you also try this command and then see if anything is output to the specified log file?
./odriveagent 2>&1 >> /var/log/odriveagent.log

Okay, I ran down the problem using a Linux forum. The message essentially means (in this instance) that the program I’m trying to run is not an executable file. The files looked right, but the size of the odrive-agent file is not the same as on my other machine. I copied the files from one machine to the other, and it works. Not sure what happened there: as far as I could tell, I was following the instructions.

I now have a shell script to sync any new directories or files. A bit of a pain, but liveable with.

Many thanks for your help.

Great! Thanks for the follow-up @bmff.engagement.

Something must’ve happened with the agent download… very odd. Good sleuthing! I’m glad you got everything squared away now.