What is the easiest way to backup full db
istvano opened this issue · comments
istvano commented
Hi,
Thanks for this great image. I use it in connection with gitlab image you also created. I run the mysql with a data container to keep the mysql data in a data container. I am wondering what is the best way to backup the whole Database ?
Thanks a lot
Sameer Naik commented
@istvano You can backup mysql databases using the mysqldump
command. Is is one of the ways you can invoke it
docker run -it --rm --volumes-from=mysql sameersbn/mysql:latest \
mysqldump -uroot --add-drop-table [database-name] > database.mysql
Similarly you can backup all databases using,
docker run -it --rm --volumes-from=mysql sameersbn/mysql:latest \
mysqldump -uroot --add-drop-table --all-databases > all.mysql
Please refer to mysqldump
documentation for further details.
istvano commented
Hi, thanks a lot !