Is there a way to merge Safari history databases? Recently Safari had a glitch and wiped out my browsing history. I only discovered this after a couple weeks but had a backup that ran up to almost the day of the loss. I've restored the history from that backup, and would like to append the recent history since the loss. Is there a way to do that? Specifically is there a process I can used to take one set of backup files (History.db-shm, History.db-wal, and History.db) and merge them into another set?
Keep one set in Safari and insert the other into another browser and then import it in Safari.
Chrome should work fine for that. https://github.com/Roman2K/hist_safari2chrome
Create a db file for Chrome and replace the empty one under the folder for Chromium in ~/Library.
Quit Chrome and import History in Safari.

Better way is to use sqlite to merge them.. but I'm illiterate in that language.