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.
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)
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!
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/”
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 !
Thx again
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"