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.sqlBreakdown of the above command
sudo docker exec bookstack_db /usr/bin/mysqldumpspecifies the container name and in-app aka virtual directory location.
--user bookstackspecifies the user authorized to take backup.
--password=bookstackspecifies the password to authenticate the user, replace the password accordingly.
bookstackapp > /home/bytegeek/bookstack_db.sqlspecifies 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…