Restoring OneNote cache files from backup
If you’ve followed my last few posts, you’ll know that I had a Windows 7 > Windows 10 upgrade go bad, and I lost my data drive in the process.
Luckily, I had a recent local backup via the excellent Crashplan, and I restored all my data. However, I discovered that this didn’t help with some of my OneNote data. The reason for this, is that I store that OneNote data in a Truecrypt file. I typically leave the Truecrypt volume dismounted, so all my OneNote data is just stored in the local appdata cache.
Then, when I mount the Truecrypt volume manually, OneNote intelligently syncs all the changes over to the encrypted volume. It works much in the same way that it might if you had notes stored on a NAS or Shared Drive, but cached them locally on your laptop when travelling. OneNote really is awesome for this.
HOWEVER – it’s not so awesome if you forget to mount the drive and sync your cache… for five weeks. This happened, and then when I lost my C: drive, I lost the entire last 5 weeks’ of cached changes.
What to do….
Well – I tried restoring the cache from backup. I followed these simple steps:
1. First, I zipped up my current OneNote cache, and then deleted the current set. These are all the files in C:\Users\<username>\AppData\Local\Microsoft\OneNote\15.0
2. Then, I restored the same files from the backup. Crashplan allows you to select a date to restore files from, so I chose one from just before the crash, and then restored the entire directory.
3. Then I ran OneNote
Eureka! I found notes I had made within the last week, so it seemed to have worked, with no complaints. Looking into the cache directory, it looks insanely complex and arbitrary, so I didn’t want to edit it in part, but replacing the whole lot seemed to work.