When OneDrive crashes I lose all my synced SharePoint folders

Copper Contributor

We have OneDrive for Business running on an AWS EC2 instance that connects back to an account that we use for our automation processes. Uptime and sync stability are key to these processes. Lately, I have noticed times that if OneDrive fails (is not shut down properly) all of the associations to synched SharePoint folders are lost and I have to manually resync ALL of them again.  there are about 30 different synced locations that we use which I, fortunately, have documented now because of this issue, but it is a painful process to resync them all manually. 

 

Is there a way to resync all of the SharePoint locations with a script instead of doing it one by one? is there a config file or registry key I can point to reestablish the connection? 

 

A separate but maybe related issue is that our process in the server sometimes generate a lot of new files or file changes and this makes OneDrive also crash. I have tried numerous ways to temporarily shutdown OneDrive and restart it but I have not been successful unless I am logged into the AWS server directly. It doesn't work when logged off (using Task Scheduler or other methods). 

 

Any help would be appreciated. 

 

Regards,


Adam

 

2 Replies
I know you don't want to hear this, but you are really using OneDrive to do something it wasn't designed to do and should probably look into using something meant for that in azure storage along with flow / logic apps to get it over to SharePoint.

Anyway, about the auto mounting of SharePoint sites, that's coming soon to GPO so you can auto mount drives that way. If GPO works, that's really only just updating registry keys so once we can get ahold of that admx update for this, you should be able to look into where it's setting registry keys for it.
Actually, here you go. Not sure if it's released all the way but is soon. It has the reg key in this article.
https://3k09.wordpress.com/2019/06/04/automatically-mount-sharepoint-team-site-libraries-for-onedriv...

(Verify the reg key [HKCU\Software\Policies\Microsoft\OneDrive\TenantAutoMount]”LibraryName”=”LibraryID”)