# Backup
docker exec $CONTAINERID /usr/bin/mysqldump -u root -proot $DATABASE > backup.sql

# Restore
cat backup.sql | docker exec -i $CONTAINERID /usr/bin/mysql -u root -proot $DATABASE