[Feature Request]: Export/Backup Shelves in folders & Markdown files #2589

Open
opened 2026-02-05 04:34:16 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @manosioa on GitHub (Jan 20, 2022).

Describe the feature you'd like

I recently stated using this project and I have to say it's very well thought and maintained.
Well done!

I'm a user of Obsidian and I'm transferring all my notes and structure to BookStack.
It would be extremely helpful to be able to export/backup all the Shelves (complete with books, pages and chapters) in folders & Markdown files.
Markdown is a future proof file type that works across all OS.

Describe the benefits this feature would bring to BookStack users

That way it will be stupid simple to import them to Obsidian or any similar tool, plus users will instantly have the folder system ready to use on any OS as it's only folders and markdown files.
Markdown is a non proprietary, future-proof file type that works across all OS, software and devices, so that will be helpful to all who use markdown for writing their notes, thoughts, documentation etc.

Additional context

No response

Originally created by @manosioa on GitHub (Jan 20, 2022). ### Describe the feature you'd like I recently stated using this project and I have to say it's very well thought and maintained. Well done! I'm a user of Obsidian and I'm transferring all my notes and structure to BookStack. It would be extremely helpful to be able to export/backup all the Shelves (complete with books, pages and chapters) in folders & Markdown files. Markdown is a future proof file type that works across all OS. ### Describe the benefits this feature would bring to BookStack users That way it will be stupid simple to import them to Obsidian or any similar tool, plus users will instantly have the folder system ready to use on any OS as it's only folders and markdown files. Markdown is a non proprietary, future-proof file type that works across all OS, software and devices, so that will be helpful to all who use markdown for writing their notes, thoughts, documentation etc. ### Additional context _No response_
OVERLORD added the 🔨 Feature Request🚚 Export System labels 2026-02-05 04:34:16 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jan 28, 2022):

Thanks for the request and kind feedback @manosioa.

The trouble that I have with such export requests is that the exact configuration and format of exports can vary quite a lot depending on use-case, and introducing a vast array of options for export can be a burden on maintenance.

These kinds of operations are why we have the REST API, which includes some endpoints for exporting to various formats (Including markdown). We have a repo with examples of using the API for various tasks. The export all books script may be of particular interest for this case.

If handy with typescript you could even build an obsidian extension to consume this API to import content in directly.

@ssddanbrown commented on GitHub (Jan 28, 2022): Thanks for the request and kind feedback @manosioa. The trouble that I have with such export requests is that the exact configuration and format of exports can vary quite a lot depending on use-case, and introducing a vast array of options for export can be a burden on maintenance. These kinds of operations are why we have the REST API, which includes some endpoints for exporting to various formats (Including markdown). We have a [repo with examples](https://github.com/BookStackApp/api-scripts) of using the API for various tasks. The [export all books](https://github.com/BookStackApp/api-scripts) script may be of particular interest for this case. If handy with typescript you could even build an obsidian extension to consume this API to import content in directly.
Author
Owner

@CrazyWolf13 commented on GitHub (Jul 20, 2024):

Hi @ssddanbrown

Just found this thread while searching the web.

I and I guess many others do this, have basically my whole build guide to my complete homelab on bookstack, so if my homelab ever gets wiped out I'd technically also loose any bookstack guides, to be able to rebuild the homelab.

I ofc. have a backup of bookstack externally, however i'd still prefer a cron job, that for example backups weekly my full bookstack shelves into shelf->folder, book -> folder, page group-> filename prefix, page -> file format, while keeping links to the image.

For me that won't matter if I could just read it in an emergency and this way slowly get up stuff, to then import full bookstack backups,

That'd be awesome, thanks!

@CrazyWolf13 commented on GitHub (Jul 20, 2024): Hi @ssddanbrown Just found this thread while searching the web. I and I guess many others do this, have basically my whole build guide to my complete homelab on bookstack, so if my homelab ever gets wiped out I'd technically also loose any bookstack guides, to be able to rebuild the homelab. I ofc. have a backup of bookstack externally, however i'd still prefer a cron job, that for example backups weekly my full bookstack shelves into shelf->folder, book -> folder, page group-> filename prefix, page -> file format, while keeping links to the image. For me that won't matter if I could just read it in an emergency and this way slowly get up stuff, to then import full bookstack backups, That'd be awesome, thanks!
Author
Owner

@ssddanbrown commented on GitHub (Jul 21, 2024):

@CrazyWolf13 if it helps I have a script here to export all books: https://github.com/BookStackApp/api-scripts/tree/main/php-export-all-books

Could set that up and schedule it via cron daily or so.

@ssddanbrown commented on GitHub (Jul 21, 2024): @CrazyWolf13 if it helps I have a script here to export all books: https://github.com/BookStackApp/api-scripts/tree/main/php-export-all-books Could set that up and schedule it via cron daily or so.
Author
Owner

@CrazyWolf13 commented on GitHub (Jul 21, 2024):

I have a script here to export all books: https://github.com/BookStackApp/api-scripts/tree/main/php-export-all-books

Sounds good, thanks!

How do I use it on my instance?
Is that file already on bookstack installation?

@CrazyWolf13 commented on GitHub (Jul 21, 2024): > I have a script here to export all books: https://github.com/BookStackApp/api-scripts/tree/main/php-export-all-books Sounds good, thanks! How do I use it on my instance? Is that file already on bookstack installation?
Author
Owner

@Gregodar commented on GitHub (Jul 26, 2024):

@CrazyWolf13 if it helps I have a script here to export all books: https://github.com/BookStackApp/api-scripts/tree/main/php-export-all-books

Could set that up and schedule it via cron daily or so.

@CrazyWolf13 if it helps I have a script here to export all books: https://github.com/BookStackApp/api-scripts/tree/main/php-export-all-books

Could set that up and schedule it via cron daily or so.

Hello thanks you for the script, i really need a try on it. As i am really bad at coding (reaaaaaallly) Can you tell me if your script IS able to "copy" external link too. I explain : i have screen capture on my boookstack page and of course i need it with my exported md file.

@Gregodar commented on GitHub (Jul 26, 2024): > @CrazyWolf13 if it helps I have a script here to export all books: https://github.com/BookStackApp/api-scripts/tree/main/php-export-all-books > > Could set that up and schedule it via cron daily or so. > @CrazyWolf13 if it helps I have a script here to export all books: https://github.com/BookStackApp/api-scripts/tree/main/php-export-all-books > > Could set that up and schedule it via cron daily or so. Hello thanks you for the script, i really need a try on it. As i am really bad at coding (reaaaaaallly) Can you tell me if your script IS able to "copy" external link too. I explain : i have screen capture on my boookstack page and of course i need it with my exported md file.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2589