Odrive Sync Agent: A CLI/scriptable interface for odrive's Progressive Sync Engine for Linux, OS X, and Windows

stuckj,

I too am using xargs to parallelize the syncs. One useful tidbit, if you are saturating your internet connection, and want to ease off during work hours, you can fire a SIGUSR2 at the xargs process to tell it to reduce its parallelism by one, so hit it 9 times with kill -12 $(pidof xargs) (on linux) and any xargs processes will be reduced by 9 processcount.

When you are ready to ratchet it back up, use kill -10 $(pidof xargs) 9 times to get back to 10.

I’ve had a sync running for a few days and this way it doesn’t stop in the middle of a file, rather xargs just stops running the parallel job count when current jobs finish.

Thanks for the contributions @stuckj and @paradox606. I added them to the post:

How do I uninstall the Linux sync agent? I cannot find a command to uninstall this.

If you followed the instructions then the only 2 folders you would need to remove are:
~/.odrive-agent (which contains the application information)
~/odrive-agent-mount (which contains the odrive files/folders)

A post was split to a new topic: Peer to peer transfer capabilities (LAN sync)

In an attempt to declutter this thread a bit, I have moved a lot of the Questions and Troubleshooting to this thread:
https://forum.odrive.com/t/odrive-agent-troubleshooting-feedback-and-questions/1297

If you have issues or questions, please post there.

Thanks!

New release of Agent is available to bring it into parity with the fixes that have been released for the Desktop. We also now have a Raspberry Pi (ARMv6) compatible build!

1 Like

5 posts were merged into an existing topic: Odrive Agent/CLI Troubleshooting, Feedback, and Questions

This is great.
Is there a way to run the sync agent on a ArmV7 system like a Drobo 5N ?

Hi @maisumgajo,
We have an ARMv6 build available. It requires glibc 2.13+: https://docs.odrive.com/docs/odrive-sync-agent#section--install-sync-agent-on-linux-rpi-

We haven’t tested it on Drobo, but it could work.

Hello guys!
I’m just wondering if there its a possibility to do some video tutorials about:

  • how to instal Odrive Sync Agent on different platforms
  • how to use
    and the most wanted video tutorial for me will be -
    - different tips and trick which you can do with Odrive Sync Agent

Unfortunately the current drobo 5N OS ships with GLIBC 2.11.1 .
Doesn’t look like it works.

Thanks for the update @maisumgajo. I thought that might be the case. :frowning:

Hi there I am very happy with this tool. I want to advise all that I have tryed the BACKUP function.
IT WORKS !!! The Command should be passed like so :
python “$HOME/.odrive-agent/bin/odrive.py” backup “temp/” “/OneDrive For Business/”

The explaination is : “temp” should be your local folder to save and “/OneDrive For Business/” the Absolute Path for the Remote Folder on your One Drive For Business Storage. So if you have Dropbox change it into “/Dropbox”

To make it scriptable you can fix the Tony’s one :

#!/bin/bash
agentdir="$HOME/.odrive-agent/bin"
export agentdir
agentmount="$HOME/odrive-agent-mount/OneDrive For Business/“
targetdir=”$agentmount/temp"
sourcedir="$HOME/downloads/test_directory"

cd “$agentmount”;
echo “CHECKING odrive mount point …”; sleep 2;
if [[ $(python “$HOME/.odrive-agent/bin/odrive.py” status | grep “Mounts: 1”) ]]; then echo “MOUNT FOLDER CORRECTLY MOUNTED”; else echo “Please Mount odrive Folder … Aborting Script”; exit 1; fi

cp -R “$sourcedir” “$targetdir”;

echo “STARTING THE BACKUP …”

python “$HOME/.odrive-agent/bin/odrive.py” backup “temp/” “/OneDrive For Business/”

exit 0

Hi @ciro.pappada,
I saw you posted this here in addition to the feature request thread. I am adding a reference to my comments over there, for the benefit of those who hit this thread but not the other:

Thx Tony for your reply ! About the backup function that it’s at a very first-stage … I’ll keep that in mind when testing it.
Anyway I am very happy about the very powerful sync too.
I think for all people needing a quick cloud backup they can use the sync option as you suggested some post before. Very Important :
You’ve probably already explained but I’m writing here two words on what does “sync” and “unsync”.
“Sync” needs a placeholder “.cloud” for already existing files and “.cloudf” for already existing folders.
When you call the sync it will transform your placeholder into your real file or folder inside your mount folder.
When you call the unsync you need to call the “unsync” function with your real local filename or foldername.
Now the unsync will transform your file/folder back into a placeholder .cloud or .cloudf.
This way you’re not synced anymore ! If you need you can resync later to update your datas.
Now I’ve ended up using “sync” for placeholders and later “unsync” files, like you suggested as backup ! :wink:
Thx again

1 Like

recursive sync for cli on windows, edit your location:
put bat file in the folder where odrive.exe is.
.cloudf are folders, .cloud are files, obviously.

@echo off
cd /d %~dp0

for /r E:\odrive\OneDrive\temp-sync %%i in (*.cloudf) do odrive.exe sync "%%i"
for /r E:\odrive\OneDrive\temp-sync %%i in (*.cloud) do odrive.exe sync "%%i"
1 Like

Thanks @bojandjuric!

We haven’t had anyone contribute a pure batch script yet. I’ve added it to the “recursive examples” post here: