SSH — Backing up your database

To backup your database with a single command, log into your web server via SSH. Visit the following article for full instructions on how to do this:

Once logged into the server, run the following command. Make sure to change the username, password, yourMySQLHostname, and dbname to the correct credentials. You can find those in your panel on the (Panel > 'Goodies' > 'MySQL Databases') page:

[server]$ mysqldump --opt --user=username --password=password --host=yourMySQLHostname dbname > nameofyourbackup.sql

You can use any name for "nameofyourbackup.sql" – just make sure it ends with .sql.

Please note the following when you run this command:

  • You only need to run the command once.
  • The command does not provide any output.
  • To an inexperienced user, it may appear that the server is not responding — Do not cancel the command action! If there is no response from the server, then you can assume that the command is continuing with the backup.
  • For large databases, a backup can take several minutes to complete.

You can now use the following FTP article for instructions on how to log into your server and download the .sql file:

See also

Did this article answer your questions?

Article last updated .