It will help save your day.
# Backup
docker exec <CONTAINER> /usr/bin/mysqldump -u root — password=root <DATABASE> > backup.sql
For Windows using Powershell with a large database you should use
docker exec <CONTAINER> /usr/bin/mysqldump -u root --password=root -r <DATABASE> | Set-Content backup.sql
It will preserve encoding from the Linux container.
# Restore
cat backup.sql | docker exec -i <CONTAINER> /usr/bin/mysql -u root
--password=root <DATABASE>