We have opened a support ticket with Microsoft on this and below is the official response from Microsoft.
OneNote has a built-in sync logic and uses it to connect to the SharePoint server directly. OneNote sets up a Peer-To-Peer(P2P) channel for each SharePoint notebook the user has open. The channel is based on the notebook GUID. The GUID is set in the registry and points to where the notebook resides on the server. On boot of OneNote, a sync occurs for each open notebook, where OneNote checks if the notebook exists in the location set in GUID. When opening, creating notebooks and authenticating OneNote needs to know if the folder that the notebook lives in, and the notebook folder itself, exist. As OneNote is set to sync automatically and frequently to update the changes, it uses high network bandwidth for these frequent transactions. If the notebooks do not exist it can save a lot of network and server traffic by stopping right there.
OneNote then uses the local OneNote cache file to compare a table of contents stored in the local cache with a table of contents from the server to sync the changes made to the notebook. So, both the GUID (registry) and the local cache play a role in successful synchronization of the OneNote Notebook.
You are planning to change the URL for the SharePoint site where these OneNote notebooks are stored from http://hostname2010/ to http://hostname/. But for each user's OneNote application the notebook GUIDs correspond to http://hostname2010/ with a different subsite or team site location. if users have several notebooks, the GUIDs will be different for them and may not be the common http://hostname2010/ location.
After the change in URL takes place the GUID for OneNote in the registry and the local cache have no way to identify what is the new location. This is because the corresponding registry and cache files can only be updated by the OneNote application. Even if we create a script to update the registry the local cache cannot be updated with the new information using a script. Only OneNote application can update the local cache with the new URL.
If the URL is still pointing a location where the notebook does not exist anymore the notebooks will fail to sync.
To update the changes, make sure that you use OneNote client application and do not use any file based synchronization methods or file explorer.
For non-shared Notebooks
a. download the notebooks locally before the change has been made from http://hostname2010/ to http://hostname/
b. then upload the notebooks back to SharePoint site http://hostname/ after the final change.
For shared notebook
a. Send an email to owners/editors that the notebook is going to be offline for 'x' days.
b. Request them to not sync the notebook and close the notebook copy from their OneNote application except for one of the authors.
c. Provide instructions to the selected author on how to change the location for the notebook using OneNote application such that it points to the new site http://hostname/.
d. Send an email to the owners/editors that the notebook is now online and they can now open it in their OneNote application from the new location http://hostname/
The notebook GUID set in the registry will be updated with the new path where the notebook resides after the migration. The client application sets up and updates the registry GUID for the notebooks and ensures that the information is also updated in the local cache.
When a local OneNote is closed, local backup still exists, but no longer synched by the OneNote cache.
OneNote syncing best practices:
Move a OneNote notebook that you've shared with others
Hope it help someone.