Jwink3101 / syncrclone

Python-based bi-direction sync tool for rclone

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Onedrive sync not working

n0valis opened this issue · comments

I have a setup with three different cloud services, two of them working flawless, Dropbox and Google Drive.
Onedrive seems to work also, no error messages, but it doesn't.
At first I get the correct info:
2021-10-18 11:57:55: A >>> B 0 files, 0.00 b
2021-10-18 11:57:56: A <<< B 960 files, 4.89 gb
but then only
2021-10-18 11:59:56: rclone: INFO : 0 / 0 Byte, -, 0 Byte/s, ETA -
2021-10-18 12:00:56: rclone: INFO : 0 / 0 Byte, -, 0 Byte/s, ETA -
every minute. No files copied.

rclone conf is ok
rclone copy OneDrive:OneDrive.ico /homes/xy
or
rclone copy /homes/xy/OneDrive.ico OneDrive:
working as intended.

Any thoughts?

Thanks,
Olaf

That is odd. I use syncrclone with OneDrive and have never had a problem.

What version of rclone are you using? There could be some flags I have hard coded to optimize but they may not work on older ones.

What version of syncrclone are you using?

What are your settings for rclone_flags, rclone_env, rclone_flagsA, rclone_flagsB?

Do you have any kind of firewall or proxy?

Have you set up your own Client ID and Key? You could be getting rate-limited with all rclone users.

Those are the easy questions. From there, let's dive in more.

Run it again with --debug. It'll spit out a ton of stuff including queues and lists. It's long. Sorry. Anyway, by the end you will see something that looks like:

['rclone', 'copy', '-v', '--stats-one-line', '--log-format', '', '--ignore-times', '--no-traverse', '--files-from', '/var/folders/mp/n9dd7hhn4mggybcfd1yjz9nw002fv0/T/tmpr_59fsyaA2B_transfer', '/home/bla/bla', 'OneDrive:bla/']

This is the actual call. What you need to do is load up Python and run the following:

>>> import shlex
>>> print(shlex.join(['rclone', 'copy', '-v', '--stats-one-line', '--log-format', '', '--ignore-times', '--no-traverse', '--files-from', '/var/folders/mp/n9dd7hhn4mggybcfd1yjz9nw002fv0/T/tmpr_59fsyaA2B_transfer', '/home/bla/bla', 'OneDrive:bla/']))
rclone copy -v --stats-one-line --log-format '' --ignore-times --no-traverse --files-from /var/folders/mp/n9dd7hhn4mggybcfd1yjz9nw002fv0/T/tmpr_59fsyaA2B_transfer /home/bla/bla OneDrive:bla/

Now, change -v to -vv and remove --stats-one-line --log-format ''. Copy and paste that into your terminal and run that. What do you get? You may also have to cd to the directory of your config file if any paths are relative. (that is where syncrclone runs from)

If that doesn't work, we have at least isolated the problem to an rclone problem and not syncrclone. If you keep debugging on that, you may want to move (and update the path of), /var/folders/mp/n9dd7hhn4mggybcfd1yjz9nw002fv0/T/tmpr_59fsyaA2B_transfer so it sticks around.

If that still doesn't work, you can remove --ignore-times --no-traverse but, depending on your syncrclone settings, may not copy everything (since rclone will adjudicate on its own differently).

Let me know how that goes!

I just installed yesterday. So everything is up to date.
rclone v1.56.2
no firewall or proxy
rclone_flags = ['--config','/mnt/disk1/homes/xy/.config/rclone/rclone.conf']
no other flags
own client ID onlx for Google Drive, not for Onedrive

It is funny. Now that it runs in debug mode it works.
I'll wait for the sync then try again without debug and come back.

Update:
Now it works. I don't get it. Yesterday it ran for over an hour, only getting
2021-10-18 12:00:56: rclone: INFO : 0 / 0 Byte, -, 0 Byte/s, ETA -
every minute.
Same this morning. Now it's good. Sorry for inconvenience.
Guess it was only a matter of talking about it ;)

I suspect it was rate limiting. I strongly suggest getting your own client ID.

Glad it's working! I'm going to close this but let me know if something breaks again!

BTW, if you're using the latest, check out the avoid_relist option. Listing in OneDrive is slow so this is will save some time.

Yes I would do that. Getting a client ID, but didn't manage to understand the process for Onedrive. Thanks to the detailed description in rclone config pages for Google drive I managed to get one for the drive account.
But I don't know what to configure for Onedrive.
I checked out https://portal.azure.com and created a client ID and a secret key. But from there on it's to complicated for me.