Taking bookstack DB backup in docker
August 23, 2022
Taking bookstack DB backup in docker in very straight forward. Copy this one line code, modify the necessary details, copy the modified code, paste it in terminal of the ssh session and BOOM! You are done with taking bookstack DB backup in docker.
sudo docker exec bookstack_db /usr/bin/mysqldump --user bookstack --password=bookstack bookstackapp > /home/bytegeek/bookstack_db.sql
Breakdown of the above command
sudo docker exec bookstack_db /usr/bin/mysqldump
specifies the container name and in-app aka virtual directory location.
--user bookstack
specifies the user authorized to take backup.
--password=bookstack
specifies the password to authenticate the user, replace the password accordingly.
bookstackapp > /home/bytegeek/bookstack_db.sql
specifies the location of the output file. This is the location from where you will recover the output file.
There you go, if you didn’t know, now you know! To explore more visit the homepage…