I’m looking to sync a subfolder inside my system Library folder. Specifically, /Library/Audio/Presets. I don’t have the option in Finder to sync that folder (or any other folder beginning with “Library”), although folders in other locations still do have the option to sync. I tried changing permissions to be similar as that of a folder which does have the option to sync with no change. If by standard practice ODrive doesn’t allow the syncing of the Library folder, is there some way to circumvent that or otherwise allow ODrive access to that folder?
I don’t believe we actively block the Library folder, but it may be restricted within Apple’s extension framework.
You can use the CLI to create the sync relationship::
Open a terminal session (type “terminal” in Spotlight search):
Copy and paste the following command into the terminal and hit enter (make sure to replace [remote/path/here] with your desired remote path):
python $(ls -d "$HOME/.odrive/bin/"*/ | tail -1)odrive.py mount /Library/Audio/Presets/[remote/path/here]
When using the CLI, the relationship will be created as defined. This means if you want the remote folder to have the same name as the local folder (Presets), you will need to make sure that folder exists and you point to it.
An example command could look like this:
python $(ls -d "$HOME/.odrive/bin/"*/ | tail -1)odrive.py mount /Library/Audio/Presets/Dropbox/MyStuff/Presets
You will need write permissions in the local folder.
Worked like a charm! Thanks so much.
Hey there, I’m OP - I know this is an old issue, but I just realized I’m having a new issue. The folder within the Library that I sync’d on both computers isn’t “downloading everything” on my secondary computer, and I can’t bring up the sync options menu for that folder when right clicking. Any thoughts?
I found this, but from my understanding, this will only force the download once and will not set it to sync-“download everything” perpetually, correct?
To be clear, you want to auto-download any items that show up on the remote side in the
I’ll have to take a look at this. Maybe this can be added to the CLI so that you can specify Folder Sync Rules without the context menu.
Another useful option would be the ability to default to auto-download any folders I sync. Since my use case doesn’t involve ever purposefully unsyncing files to the cloud, it is a bit annoying to have to manually select auto download everything for each folder I sync.
We’ll be adding the option to specify folder sync rules to the CLI in the next release, which should hopefully be out next week.
Awesome, looks like it was added today! Do you have the new terminal commands already written up?
Hi @psymbionic ,
The desktop clients were released that support these new commands, but the CLI and agents are still pending a final sign-off from QA. It was held up because we also added in the ability to specify folder sync rules from the CLI and there are some additional tests that need to be completed for that.
I expect to release them tomorrow. I will ping this thread with the info once they are out.
Our most recent release today has the update odrive.py CLI in it, which you can use to specify the sync rules on a folder.
The new command is
usage: odrive.py foldersyncrule [-h] [–expandsubfolders] path threshold
path The local path of the folder to apply the rule to.
threshold Size in MB (base 10) for the download threshold. Use '0'
for nothing and 'inf' for infinite. Files that have a
size under this will be downloaded.
-h, --help show this help message and exit
--expandsubfolders Apply this rule to files and folders underneath the
A command like this should work:
python $(ls -d "$HOME/.odrive/bin/"*/ | tail -1)odrive.py foldersyncrule "/Library/Audio/Presets/Dropbox/MyStuff/Presets" inf --expandsubfolders
Hey Tony, thanks for your help and work here!
This workaround seems to only intermittently work. After applying on one of my computers, nothing happened even after restarting oDrive and watching the Sync Log to ensure all my folders had been scanned. It took me running the below to find that I still had a number of missing files and .cloudf files tucked away inside the synced folder:
exec 6>&1;num_procs=3;output=“go”; while [ “$output” ]; do output=$(find “/Library/Audio/Presets/Xfer Records” -name “.cloud” -print0 | xargs -0 -n 1 -P $num_procs python $(ls -d “$HOME/.odrive/bin/”*/ | tail -1)odrive.py sync | tee /dev/fd/6); done
After making this realization, I tested if things are syncing correctly between my two computers. Seems that I am getting a file put into a shared folder on one computer to immediately show up in my cloud (GDrive), and then about 10 minutes later the file will download to the other computer. Works about like this both ways, which I assume it normal.
So this means that older .cloudf files that were tucked away in these folders previously are not automatically synced locally by the new command you provided in your last reply. I was able to confirm this by running the above exec on my second computer (which I had previously run it on last month) and found a handful of .cloudf files that I’m guessing have either been selectively unsynced or otherwise weren’t forced to sync at any other point.
Big picture, I just want to make sure things are synced automatically and I don’t have to worry about it. There’s times when I’m away from home without internet access on my second computer, and it becomes a hassle to try to force downloads if this is a persistent issue.
Thanks again for being so on top of this. Cheers!
Hi @psymbionic ,
The tricky thing with folder sync rules is that they apply for only new content on the remote side. The reason for this is that we want to allow the ability to still unsync items after you have already synced them down, collapsing structures or freeing up disk space. Otherwise anything you unsynced would immediately be synced again.
This means that if you want everything in a folder dowloaded and expanded and then anything new to be synced based on the rules you apply, you will need to perform a full recursive sync and apply the folder sync rules. It actually doesn’t matter which order you do it in, but both actions will need to be done. The full recursive sync will hit anything that odrive already “knows about”, and the folder sync rules will hit anything that shows up in the future.
I know that can seem a little funky, but hopefully it makes sense. My apologies for not explaining that before.
Ahhh yes, that makes sense now! Seems to be exactly what I was experiencing. Now that I have have fully synced each computer with the other, I assume I shouldn’t have any issues unless I manually unsync something on purpose to save space like you mentioned.
Thanks again for all your attention on this!