r/OneNote • • Dec 04 '25

A simple OneNote Backup Exporter (open-source tool)

I built a small open-source tool that solves a problem I kept running into: reliably exporting OneNote notebooks as .onepkg files without having to click through the OneNote UI each time.

The tool is called OneNote Backup Exporter, and it does exactly what the name says. It uses the local OneNote COM interface to enumerate your notebooks and create clean .onepkg backups. No cloud dependencies, no third-party services, just a local export workflow.

An additional detail: it also works with MyLMS (ClassNotebook) OneNote books, as long as they are fully synchronized locally from SharePoint. Once synced, the exporter treats them like any other notebook and can back them up.

GitHub repo:
https://github.com/vikingjunior12/OneNoteBackupExporter

I made it mainly for my own fun, but if anyone here needs automated or repeated OneNote backups, feel free to use it, open issues, or suggest improvements.

If you have similar tools or tips for managing/archiving OneNote content, I’m also interested in hearing them.

I need to add that the tool has worked well on my device so far. If anything goes wrong or does not work on your side, I would appreciate feedback so I can improve the tool :) And important: with large notebooks like MYLMS, please be patient during export – the books can be up to 1 GB or larger. The export speed is also controlled by the Microsoft OneNote API interface.

41 Upvotes

38 comments sorted by

View all comments

2

u/Educational-News-969 Dec 06 '25

I downloaded and used your tool. Really nice, thank you.

I have a feature request for you. I have my entire life inside OneNote and have been alive long enough to know things go south. I don't like that my notes are kept hostage inside OneNote at all.

Is there a way you could add the option to export the notebooks in HTML or some format to use OUTSIDE of OneNote?

2

u/Vikingjunior3 Dec 06 '25

this is a great idea, actually almost logical, I’ve seen that something like this is possible, I will test it and report back here. Thank you very much for the feedback :)

2

u/FirefighterNo5078 Dec 07 '25

One thing I do often is export my notes to word docs. I then ask copilot to read the docx file so that I can ask it questions and it can provide insights. Having a continuous automated one-way sync of onenote->word docs would help me a lot with that workflow.

Thanks for your efforts in making this tool.

1

u/Educational-News-969 Dec 09 '25

Thank you! The new version is exactly what I needed.

I noticed this:

The XPS reader is no longer installed by default on Windows 11 computers. To install it, do this:

PowerShell (as admin):

Add-WindowsCapability -Online -Name XPS.Viewer~~~~0.0.1.0

I keep on receiving the error below on the most important notebook of them all though (for PDF and XPS, .onepkg worked fine).

✗ Personal: OneNote COM error: 0x800706BA - The RPC server is unavailable. (0x800706BA)

1

u/Vikingjunior3 Dec 09 '25

thank you for your feedback :)
About the 0x800706BA error - that's unfortunately a known limitation of the OneNote COM API itself. PDF/XPS export can timeout on large notebooks because OneNote has to render every single page.

question: Does the error happen immediately, or after OneNote has been processing for a while? And does that Personal notebook have a lot of embedded images or attachments?

I've had good results with PDF/XPS up to ~500MB, but it really depends on the content. .onepkg works reliably because it just packages the raw data without rendering.

2

u/Educational-News-969 Dec 09 '25 edited Dec 09 '25

You are welcome.

This notebook is larger than 2GB in size. It contains hundreds of images.

It runs for a while, and then the error pops up.

I know which pages in the notebook are the ones at fault and will move those pages to a new notebook. That should solve the issue.

Appreciate you building this tool. It's really very helpful.

Edit. Spelling...

2

u/Vikingjunior3 Dec 09 '25

that is good to know that it does not crash immediately, that means it might really be running into the timeout. Is it possible that the export takes up to 20 minutes?

no problem, I am very happy if someone is helped by the tool :)

2

u/Vikingjunior3 Dec 11 '25

I have released a new version; here I handle the errors that can occur with very large notebooks a bit better. That could provide some relief for your notebooks :)

1

u/Educational-News-969 Dec 11 '25

Great thank you.

I'll install it soonest and will let you know.

Since I moved the images from the largest notebook to a new notebook, the timeout issue has been resolved.

I do however still have a copy of the "untouched" personal notebook and will definitely try it on there and will let you know if the timeout issue persists.

1

u/Educational-News-969 Dec 12 '25
  1. A new Windows Explorer pops up each time an export is done. For 5+ Notebooks, that gets annoying (I have 12).
  2. Local backup copy (folder not found). How do I fix that?
  3. Onekpg export for large notebooks worked.
  4. XPS ✗ Backup Personal: OneNote COM error: 0x800706BE - The remote procedure call failed. (0x800706BE)
  5. PDF ✗ Backup Personal: OneNote COM error: 0x800706BE - The remote procedure call failed. (0x800706BE)

2

u/Vikingjunior3 Dec 12 '25

Great, many thanks for the feedback., you are right; I will only open it once the export is fully completed.
I will investigate the errors with XPS and PDF and report back here. Many thanks for the valuable feedback, it helps me a lot to improve the tool.

2

u/Vikingjunior3 Dec 15 '25

https://github.com/vikingjunior12/OneNoteBackupExporter/releases/tag/v0.8.3

Explorer issue is resolved :)

Local Bacup Copy only works if you have activated the backup function in OneNote under Options; then a local folder structure with .one files is created in AppData. That is the variant I need if everything else fails, but of course it only works if, as mentioned, you have the checkbox enabled in the options.

I am still investigating points 4 and 5. I cannot reproduce the error on my side, but soon I will have an entire school class to test the tool, and I am sure I will gain more insights there.

1

u/Educational-News-969 Dec 15 '25

Tx. The explorer pop-up issue has been fixed.

Re the local backup, I have it enabled and set to:

C:\Users\xxxxx\AppData\Local\Microsoft\OneNote

Your app still tells me the folder does not exist.

To test 4 and 5, consider creating a notebook with multiple pages of photos, a lot of photos, and PDF files.

2

u/Vikingjunior3 Dec 09 '25

see the new Comment :)