If you have direct access to the server, I'd do a command line backup. It's much quicker and you bypass PHP and the webserver completely.
mysqldump databasename -u username -p > database.dump
Replace databasename with the name of the database
Replace username with the database username
It will prompt you for the database password.
Command line is always going to be the quickest and most reliable means of doing a backup.