BookStack backup and restore
Pair a MySQL dump with BookStack’s configuration, image uploads, page attachments and custom themes.
Last updated
On this page (5)
BookStack · Backup and restore
Before you start
- Same BookStack release for the initial recovery.
- MySQL client and credentials.
- Private backup storage and an isolated restore host.
Procedure
- Quiesce writes and run
mysqldump -u bookstack -p bookstack > bookstack.sqlwith the actual database account and name. - From the application root, archive
.env,public/uploads,storage/uploadsandthemes. If uploads use object storage, capture that store separately. - On the isolated host, import with
mysql -u bookstack -p bookstack_test < bookstack.sqlinto a fresh database. Restore the files with expected permissions; update target connection settings but retain the originalAPP_KEY.
Verify the result
- Open a known book, a page image and an attachment.
- Test a known MFA-enabled account; verify the recovery URL is not the production URL.
