I seem to have installed odrive successfully, linking a folder in my home directory with Google Drive. But nothing happens: I add a file to the folder, create a new sub-folder, and nothing changes on the Google Drive. I can’t find instructions on how to locate the problem.
Hi @bmff.engagement,
Try issuing a refresh command on the folder(s) with a change. That will cause odrive to look at that location immediately (both local and remote). If this is not done, odrive will still pick up the change when it actively scans, but it could take many minutes.
Thanks … how do I issue a refresh command? I’m running Linux, so there is no GUI.
Hi @bmff.engagement,
It is one of the available CLI commands:
usage: odrive.py [-h]
{authenticate,mount,unmount,backup,removebackup,sync,stream,refresh,unsync,xlthreshold,encpassphrase,syncstate,status,deauthorize,emptytrash,shutdown}
...
odrive Make Cloud Storage THE WAY IT SHOULD BE.
positional arguments:
{authenticate,mount,unmount,backup,removebackup,sync,stream,refresh,unsync,xlthreshold,encpassphrase,syncstate,status,deauthorize,emptytrash,shutdown}
commands
authenticate authenticate odrive with an auth key
mount mount remote odrive path to a local folder
unmount remove a mount
backup backup a local folder to a remote odrive path
removebackup remove a backup job
sync sync a placeholder
stream stream placholder/remote file eg. stream path | app -
or stream to a file eg. stream path > file.ext
refresh refresh a folder
unsync unsync a file or a folder
xlthreshold split files larger than this threshold
encpassphrase specify a passphrase for Encryptor folders
syncstate get sync status info
status get status info
deauthorize deauthorize odrive to unlink the current user and exit
emptytrash empty odrive trash
shutdown shutdown odrive
optional arguments:
-h, --help show this help message and exit
usage: odrive.py refresh [-h] folderPath
positional arguments:
folderPath path of the folder to refresh
optional arguments:
-h, --help show this help message and exit
Okay, I issue the refresh command and the result is a list of the folders and files, starting with “Not Synced”.
I then tyied the 'sync command and it needs me to point to a placeholder, but I don’t have any placeholders on my machine, only files I want to sync. It sounds like I’m missing something.
Hi @bmff.engagement,
The refresh command should be all that is needed to ensure that odrive sees your local changes.
There could be something else preventing sync. What do you see when you issue the status command?
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.