OneDrive 20000 files limit?

Hi, using the Linux client to a OneDrive Business account. Things looked good for a while but now I have folders that say “Not Synced” and I cannot find out why. odrive status is clean, each further option of it is clean as well (see below), I’m refreshing, restarting Odrive often, and have no symbolic links or stupid filenames in these folders. I’ve read about OneDrive’s 20000 items restriction but it is supposed to have been lifted: What is the status with this restriction if using OneDrive via Odrive? Is there any way to find out if that’s my problem? I have 19087 files to sync, together with dirs it could be close to 20000. Many thanks for ideas.

isActivated: True hasSession: True
email: accountType: OneDriveForBusiness
syncEnabled: True version: prod 916
placeholderThreshold: neverDownload autoUnsyncThreshold: never
downloadThrottlingThreshold: unlimited uploadThrottlingThreshold: normal
autoTrashThreshold: never Mounts: 1
xlThreshold: never Backups: 2

Sync Requests: 0
Background Requests: 0
Uploads: 0
Downloads: 0
Trash: 0
Waiting: 0
Not Allowed: 0

:~$ odrive status --mounts
/home/[user]/odrive status:Active
:~$ odrive status --backups
/home/[user]/odrive/odrivesync status:Active
/home/[user]/odrive/odrivesync status:Active
:~$ odrive status --sync_requests
No active sync requests.
:~$ odrive status --uploads
No uploads.
:~$ odrive status --downloads
No downloads.
:~$ odrive status --background
No active background requests.
:~$ odrive status --trash
No trash.
:~$ odrive status --waiting
No waiting items.
:~$ odrive status --not_allowed
No not allowed items.

Hi @m.balazs,
odrive will be at the mercy of any server-side restrictions OneDrive may have, but I would expect an exception when trying to upload, if this was the case.

Can you provide an example of a folder that is not syncing?
What does “syncstate” show when running it against that folder?
Does that folder exist in the cloud yet? If so, can oyu add a file remotely and see if it shows up locally after a refresh?

Thank you Tony. OneDrive For Business/odrivesync/zene/ was one of the small directories saying “Not Synced”. So I created a new file and that didn’t do anything. Then I did odrive refresh on this one, and guess what: it solved ALL of my problems. Suddenly this one and every other directory became “Synced”.

So I took a look what’s going on and it turns out that I was doing “odrive refresh /home/[user]/odrive/OneDrive\ For\ Business/” regularly. This brings back several “Not Synced” errors on various sub-directories. If I do, instead, “odrive refresh /home/[user]/odrive/OneDrive\ For\ Business/odrivesync/” (this is where all of my stuff actually is), then everything becomes “Synced” and all looks fine. Is this the expected behavior? Sorry I still need to learn these things. But it seems to solve my problems for now.

Hi @m.balazs,
odrive should be able to get things synced without requiring a refresh of anything, it just may take a while if the structure is large.

Refreshes are not recursive, so they need to be applied to any structure that you want to have an immediate refresh of. In this case it is possible that odrive was retaining a “stale” designation for the folders in question. I usually recommend performing a refresh on the parent folder for any new content changes you make, just to be sure things are uploaded immediately.

If you want to be doubly sure, you can run a recursive refresh like this, to make sure you hit every folder at least once (paths may need to be changed for your system):
find ~/odrive-agent-mount/ -type d -exec python "$HOME/.odrive-agent/bin/" refresh "{}" \;

Thanks. (In case interested to collect user habits, I’m not moving files by hand to/from my Odrive folder. I’ve actually not let any cloud services touch my files directly since Dropbox started to mess up with file permissions a few years back. Instead, I replicate those folders I want to back up and only let Odrive and others see this replica bit. I update these replica folders using rsync which runs very fast and only makes incremental changes. I then also run it dry backwards to see if Odrive actually changed something or if any files need to be deleted.

Then I also have my little tester script that checks if Odrive has errors and returns any folder that’s not “Synced”. In this one I just do one refresh to /home/[user]/odrive/OneDrive\ For\ Business/odrivesync/ which is parent to everything else. It seems to work fine recursively now.)

1 Like