I have a Kindle 2 and I have some books I did not purchase from the Amazon store. Mostly PDFs, text files and
.mobi files from other eBook stores.
Is there a way to export or otherwise back up my notes, highlights and bookmarks for those books?
You may use this small app to parse your 'My Clippings.txt' for Win and Mac.
This one parse automatically the code, you can add custom tags on it. It is free unless you need to retrieve your clippings from the iphone kindle app (in this case you would need a paid chrome app).
Unfortunately https://blog.clippings.io/2015/11/16/how-to-save-kindle-highlights-in-personal-documents/ mentions these important caveats:
For this to work, your highlights and notes MUST have been physically made on your kindle (not using Kindle on phone) because the Kindle App does not produce a ‘My Clippings.txt’ file, which is the only place where highlights and notes made on personal documents get stored.
To transfer highlights and notes from AMAZON purchased books you can use either the Clippings.io Chrome Extension, or simply use the ‘Click to Upload’ button.
It seems like exporting highlights/notes made on a Kindle app is not possible (unless maybe manually one at a time).
In short you just need to upload your myclippings.txt to clippings.io. Step by Step instructions on the blog article