Backup the container database to a dump file
docker exec -i “container_name” mysqldump –no-tablespaces -uUsername -pPassword –routines –triggers “database_name” > /root/…/mysqldumpfile.sql
Restore the dumpfile to the container database
docker exec -i "container_name" mysql -uUser -pPassword "database_name" < /root/.../mysqldumpfile.sql