In this article, i want to share some information how to backup MySQL database that running on Docker Container.
The environment that i use is Ubuntu Linux running Docker container. MySQL is running on top of Docker container and mysql backup is using mysqldump.
Here are few steps, how to backup MySQL that running on Docker container:
Check your MySQL container name
Backup your database using this command:
docker exec [mysql_container_name] /usr/bin/mysqldump -u [mysql_username] --password=[mysql_password] [database_name] > [destination_path]
Verify your backup destination path. Make sure backup sql file has been added to destination