1. Home
  2. Backup & restore
  3. How do I back up my database?

How do I back up my database?

There are various ways to create a backup of a database, and in these instructions we describe two of the most common options.

We automatically save backups of all data on all web hosting accounts, Managed Servers and Agency services once per day via the backup tool Acronis. You may read more about the tool here.
If you have a Managed Server and wish for us to save backups more often than once per day, contact us and we’ll take it from there.

phpMyAdmin

You can create a backup of your database by using phpMyAdmin, accessible via cPanel for your web hosting account.

  1. Begin by logging on to cPanel.
  2. Then click the icon phpMyAdmin under Databases.
  3. Once you’ve entered phpMyAdmin, you will see a list of your databases to the left. Click the one you’d like to back up.
  4. Now, in the menu at the top of the page, click the tab Export.
  5. Finally, select the export method you want to use, either Quick or Custom. If you do not know that you must set any specific options for the export, use Quick. You also need to choose export format; choose SQL here. Then click Go to create your backup.

SSH

You can also create backups of your databases via SSH. To do this, firstly, you must connect to your account via SSH, and we have a set of instructions for that here.

Once connected via SSH, run the following command to create a backup of your database:

mysqldump -u username -p'password' dbname > /path/to/mysqlbackup.sql

Replace username with the database username, and password with the correct password for the database user. Also, replace dbname with the name of the database, and enter the correct path to where you want to save the backup.

Do not save the backup file in a folder accessible via the Internet. If you do, anyone could download your database. Instead, save the database file e.g. in the document root of your account.

Was this article helpful?

Related Articles