Backup Database

How do you backup the elgg database?  I was wanting to upgrade elgg but dont know how to back up the database.. thanks