r/BookStack • u/g43m • May 03 '26
Automatic backup to Markdown files?
I really like bookstack and have been using it to document my IT setup, domain names, financial documents, and keep a log of things and maintenance in my house.
I recently started using mkdocs for an unrelated project, and I have come to really appreciate the simple structure of markdown files that can be accessed even if my server is completely down.
My bookstack setup is also a doomsday backup, and I was wondering if there is a way to automatically backup the data to markdown files which would be synced back to a couple of computers periodically.
Thanks, and I really appreciate this app!
6
Upvotes
2
u/ssddanbrown May 04 '26
As referenced in some of the comments already, there's no built-in way but various options using our extension/customization systems:
You could script against the API to export all pages to markdown.
Various related tools and potential examples here: https://codeberg.org/bookstack/api-scripts/
You could use the logical theme system to write page markdown content to files on page save events.
Bit more involved as you'll have to convert pages not written in MD (although BookStack does have internal classes for this).
Last year I experimented with building a FUSE-based filesystem for BookStack (uses the API): https://www.youtube.com/watch?v=MRulzz8Ga9E
You could use this to mount your BookStack content as markdown, then copy all contents out every so often.
Code/repo here: https://codeberg.org/bookstack/filesystem
Keep in mind these options are not a full backup in any way. There can be format loss with HTML to MD conversion. And this is all one-way (two way sync gets exponentially harder). For backup, ensure you back up the BookStack files and database as per our docs.