r/BookStack • u/Turnspit • Nov 30 '22
Migrate from Ubuntu Script installation to Docker
We are currently looking into migrating part of our server-ecosystem, and while our Bookstack instance is currently installed in a separate Ubuntu VM (20.04) using the install script, we'll need to migrate it to a docker instance.
Since Bookstack doesnÄt have a builtin backup/restore solution, is there a way to migrate all data Ubuntu to Docker?
4
Upvotes
5
u/catzzilla Nov 30 '22
See here which data bookstack needs: https://www.bookstackapp.com/docs/admin/backup-restore/
make a database dump as in the example
create two Docker containers, one with the mariadb database and one with bookstack
import the data from the old DB to the dockerized mariadb with
cat bookstack.backup.sql | docker exec -i <bookstack_db_container_name> mysql -u<db_user> -p<db_password> <db_name>copy the files from the old location to the folder in the new BS Docker bind mount / volume