OneNote SkyDrive Sync

Why you shouldn't use other synchronization systems to sync notebooks

Disclaimer

This is not an official Microsoft document or an official statement from Microsoft. I am only explaining my understanding of the topics discussed and I may be wrong.

What this post is about

This post is about OneNote - SkyDrive sync model. I am writing it because OneNote users sometimes fail to set up synchronization correctly due to misunderstanding of how OneNote sync works and they try things that doesn't work as expected. I will try to explain how OneNote synchronizes with SkyDrive, how that is different than other synchronization models and the best practices for setting up your notebooks for synchronization. We will start with the other synchronization systems people try to use for this purpose.

Traditional Folder/File Sync Models

You can call this Standard Folder/File Sync Models if you want. I am referring to all the other PC-to-PC (Device-to-Device) or PC-to-Cloud (Device-to-Cloud) folder/file sync models. This includes SkyDrive Desktop sync application (certain exceptions notwithstanding), the deprecated Windows Live Mesh, DropBox, Google Drive etc. (Again I don't know the exact details of all the services/applications mentioned here, just my understanding).

Working Offline

These folder/file synchronizations systems/services typically work by keeping a copy of the files on your PC to allow you to work offline. Applications that work on those files will work on the local copy and the user relies on the synchronization system to keep files up to date between multiple computers and the cloud.

Detecting and Synchronizing Changes

The synchronization system monitors changes to the files in the folder(s) they synchronize and when they detect changes they will send the changes to the server, while simultaneously checking with the server to see if there are updates on the server. If the synchronization system wasn't running at the time the files are changed, it may have to talk to server or look at some data it previously stored (like a hash of the file) to understand what is changed. The most important thing here is that the unit of synchronization here is a file. Therefore, unless the sync system has some additional smarts built into it, if a single byte is changed in a file, the system has to upload/download the whole file.

Figure 1 - Typical file sync mechanism

Syncing Whole Files

Let's step back and try to understand what we just said. If you have a 500MB video file and you edit the file to remove a single frame from it, the system has to upload the whole 500MB because it doesnâ€™t know what exactly changed inside to tell the server to do a similar change on the server copy. Now as I said, the system may have more smarts built into it, like dividing the file into small pieces and comparing them and trying to identify what part is changed. Based on how the contents of the file is arranged in the file, this may help reduce the amount of data to be synchronized down to very small. But if it had knowledge about the format of the video file, (and if the format was designed to make it possible), it could inspect the file and understand the type of change that was done and tell the server to go ahead and delete the frame #123. This would be much more efficient but it is not possible with a general purpose sync system. In case of a OneNote notebook, this can cause huge traffic because OneNote frequently and automatically saves changes and this can cause several large file uploads as you edit a page.

Handling Conflicts

Now let's look at how such a folder/file sync system would handle conflicts. Let's say you were offline when you removed that frame from that video file. Then you moved to your laptop and opened the same video file and did some other change, say edited a different frame. When both computers get online and try to sync with the server, the system will notice that the same file is changed in two places and would have to ask the user to resolve the conflict by picking one over the other. Again if the system understood the file format, it could see that removing frame #123 an editing frame #124 can be done simultaneously without conflicting with each other. Then it would tell each PC to duplicate the editing done in the other PC and things would be happily in sync again without user having to intervene and syncing hundreds of MBs of files.

Figure 2 - Conflict situation with file sync mechanism

How OneNote Is Different

OneNote has a built-in synchronization system that works against local files, file shares, SharePoint and SkyDrive. Since the target audience of this post is the general public, the SkyDrive sync is typically what I refer to here, though others work very similarly. This built-in synchronization system works directly against the server and does not require a separate sync application to sync locally made change.

Smart Synchronization

This synchronization system has understanding of the OneNote file format, which is specifically designed to make syncing easier. Now you might see where I am going with this. When you make a change on a OneNote page, the synchronization system knows exactly what change was done and it can tell the server about it precisely. For instance if you add a paragraph of text in a page in a OneNote section, it can tell the server that a paragraph of text is added to the certain page in the certain section. This small difference that is being synced is sometimes called the "delta". OneNote stores each section as a .one file, so a traditional file synchronization mechanism would have to upload a whole section when you make a small change to it.

Figure 3 - OneNote Sync Model

Merging Changes

Syncing only the small change you made is orders of magnitude more efficient than syncing whole files. It also allows you to make changes simultaneously to different parts of the file from different computers without conflicting. This is very useful if you are sharing the notebook with other people. You and they can edit different pages, or different part of the same page, and OneNote will seamlessly synchronize and merge all the changes without creating a conflict, which a file based synchronization system cannot provide.

Setting up Direct Sync

By now you should have understood why you shouldn't be using a file based synchronization system to keep your notebooks in sync between multiple computers. It may be surprising when I say this, but you shouldn't be using SkyDrive Desktop sync app to sync your OneNote notebooks to SkyDrive (or other services like DropBox). What should you be using instead? The built-in direct sync.

The built-in sync can be set up by sharing a notebook to your SkyDrive from inside OneNote. If you have a notebook stored locally on your computer, go to File > Share in OneNote and pick Web and choose a folder and it will upload the notebook to SkyDrive and set up direct sync. Note that the local notebook is left where it was and disconnected. It will no longer be updated or synchronized to SkyDrive, you should simply get rid of it. Some people think that that folder is still active and that OneNote is syncing that folder with SkyDrive. No, OneNote creates a different/hidden local copy as I will explain below and this folder will be abandoned.

Figure 4 - Sharing a Notebook on SkyDrive from OneNote

If you are creating a new notebook, you should create it from OneNote by picking Web as the location instead of creating it locally and then sharing.

Other Benefits of Direct Sync - Web App and Mobile Sync

The notebooks shared from OneNote to SkyDrive using built-in sharing has other benefits compared to files synchronized through SkyDrive Desktop app. The built-in sharing functionality correctly sets up the notebook on the server so that OneNote Web App will be able to open it. Also for mobile versions of OneNote (Windows Phone, iOS, Android) can only open notebooks that are shared through this mechanism. This is a common problem people hit when they share notebooks using SkyDrive desktop app and the try to open them on their mobile phones.

What about Working Offline?

When using built-in sync, OneNote will create a local copy of the notebook, similar to the file synchronization systems. This local copy however is not in a folder that the user normally works with. It is in some obscure folder that stores other OneNote data like your settings, and you shouldn't need to ever deal with that folder or the files in there storing the local copy. The important thing to understand here is that this allows OneNote to work offline and merge changes later when you get online.

Syncing to two Locations?

Some people ask about syncing a notebook to two locations. For instance syncing the same notebook to both SkyDrive and to a network location. This is not possible, the notebook is only at a single main location. OneNote creates a hidden local copy to work offline, but that is it. No second sync location can be set up.

Opening Notebooks from SkyDrive

How would I then open the notebook from another computer? If I am using SkyDrive desktop app for other files, and notebooks are directly synced to SkyDrive by OneNote, wouldn't SkyDrive desktop app download the whole notebook each time it is changed anyways?

We said you shouldn't use SkyDrive desktop app to sync notebooks. This may bring up two questions:

Let's tackle the first question first, then we can look at the second one after that. There are multiple ways to open notebooks:

File > Open

Figure 5 - Opening SkyDrive notebooks from OneNote

The easiest way is to go to File > Open in OneNote and you should see the list of notebooks on your SkyDrive. You can pick one and open right into OneNote

Web App > Open In OneNote

Figure 6 - Opening in OneNote from the Web App

Another way is to open the notebook on www.skydrive.com in OneNote Web App and there is a button on the ribbon called "Open in OneNote"

Figure 7 - Copying link to a notebook

The third way to open notebooks is using notebook links. On the computer you set up sync, right click on the notebook and choose "Copy Link to Notebook", then paste it to an e-mail and send it to yourself. OneNote will automatically offer you to create such an e-mail for you the first time you set up sync for a notebook.

Simple enough eh? Now onto the second question

Using SkyDrive Desktop App along with Built-in Sync

The second question above was: If I am using SkyDrive desktop app for other files, and notebooks are directly synced to SkyDrive by OneNote, wouldn't SkyDrive desktop app download the whole notebook each time it is changed anyways? The answer is no. SkyDrive desktop app knows about these notebooks and will create a link instead on your local SkyDrive folder that takes you to OneNote web app. This will avoid unnecessary download of the notebook as OneNote is already directly syncing to SkyDrive.

Key Takeaways

OneNote has built-in sync with SkyDrive allowing it to synchronize only the changes, which is significantly more efficient than file synchronization mechanisms like SkyDrive Desktop app or DropBox as it knows about the file format and can sync only the changes

The built-in sync also allows OneNote to merge most changes without creating conflicts

You shouldn't use other file synchronization mechanisms to synchronize your notebooks

OneNote web app and mobile apps require notebooks to be synced using the built-in sync

Use File > Share > Web to set up built in sync

Use File > Open, or the web app, or the notebook link to open notebooks

You can still use SkyDrive Desktop app to sync other files

The old local copy of a notebook that is shared to web is now abandoned and will not sync to SkyDrive

Hopefully this will clear up some misunderstandings about OneNote sync. You can ask questions below if you need more information or clarification and I will try to explain further.

Comments