# Backing Up a Database as Root
We recommend backing up MySQL databases using the customer's environment. You can either:
- Add an SSH key or a password to the website under "developer tools" in the website dashboard
- Log in to your server as root and "su" to the website's unix user
- Dump a database as root
To dump a database as root:
- Log in to your system as root. If you have a multi server cluster, this should be the server running the database role for the website you wish to back up.
- docker exec mysqlcd sh -c "mysqldump database_name_here > /var/backups/database_name.sql"
- You will find the resulting file in /var/local/enhance/mysqlcd-backups on the host o/s.
We recommend that you rm the backup file when you're done.
WARNING
Be careful executing commands as root, especially those which directly redirect output to files.