How to Backup MySQL Databases in cPanel

Dynamic websites often rely on databases to store, retrieve, and save information.  Therefore, it is insufficient to only backup website files, which often only contain scripts and applications, while ignoring the databases, which hold your actual content.

Backing up your files and databases with cPanel/WHM is easy and relatively painless.  With it you can backup individual files and databases, or every database on your server.  To perform individual database backups:

1. Login to your cPanel account
2. In the “Files” section, select “Backups”
2. Find the section labeled “Download a MySQL Database Backup”

For a full server backup:

1. Login to WHM
2. Click “Configure Backup”
3. Select the options you want.

For recurring automatic backups, make sure backups are enabled and select the interval for your backups to occur.  You may select daily, weekly, or monthly backups.  If you have a separate drive dedicated solely for backups, you can use the “Remount/Unmount” feature to mount your drive for backups and then unmount it upon completion.

The “Incremental Backups” option lets you backup only the data that has been changed.

For databases, you can select “account only” backups that will backup each account individually or select “Entire MySQL Directory” to backup all databases from all accounts into a single backup archive.

“Backup Type” allows you to specify where you want your backups saved.  The default choice is “Standard”, which relies on either a local drive, attached device, or network filesystem (such as NFS or Samba). Alternatively, the “Remote” option will backup your data to a remote server using FTP.  Once you have your backups configured, you should periodically check and test their integrity to make sure the backups are being performed correctly.