Loading...

Knowledge Base
Save up to  70% off.  Start your website today!

Download and Restore MySQL Database Backup

 

Backups are a very important part of maintaining a website. It is important to back up your files and databases on a week-to-week or month-to-month basis or before making any major changes so that a backup is available in the event of data loss.

A MySQL database backup will backup all data in a specific database. This can be useful for backing up the valuable data of various scripts; however, it is only a partial backup. It will not include DNS, home directory files, or other system files and settings. If you would prefer to generate a full backup, please see the following article:


Create a MySQL Database Backup

To create a backup of your MySQL Database:

  1. Log in to cPanel. There are two ways to access your cPanel.
    • Option 1: Access your cPanel directly.
    • Option 2: Access your cPanel via your Customer Portal.
      1. Log in to your Customer Portal.
      2. Click Hosting in the left-side menu.

        Customer Portal - Hosting menu

      3. If you have a single hosting package in your account, scroll down to the Quick Links section.


        If you have multiple hosting packages in your account, locate the hosting package you want to manage on the Hosting Packages page, then click its Manage button.

        Hosting tab - Manage button

      4. Under the Quick Links section, click the cPanel button.

        Hosting menu - Quick Links - Launch cPanel

  2. In the Files section, click on the Backups icon.

    HostGator Files Backups Icon

  3. Under Partial Backups, look for Download a MySQL Database Backup, and then click the name of the specific database you want to backup.

    HostGator Create a MySQL Database Backup

  4. Wait for the download to complete.

The backup file will be downloaded in a .sql.gz file, which can be opened with the Linux command line. The file can also be unzipped from a Windows-based machine with the appropriate software.

Restore a Home Directory Backup

Warning: Restoring a backup will overwrite any existing files!

A MySQL database backup can be restored in cPanel in the same place where the backup was created.

  1. Log in to cPanel. (See options above on how to log into your cPanel)
  2. In the Files section, click on the Backups icon.

    HostGator Files Backups Icon

  3. Under Partial Backups, look for Restore a MySQL Database Backup, then click the Browse button.

    HostGator Restore a Home Directory Backup

  4. Navigate to the appropriate destination in the popup that appears and select the backup file you intend to use.
  5. Click Open.

    HostGator Restore a Home Directory Backup

  6. Click Upload.

    HostGator Restore a Home Directory Backup

  7. A popup will show, displaying the database name and status of the database restore. This is only for confirmation purposes and is safe to close.

    HostGator Restore a Home Directory Backup

Did you find this article helpful?

 
* Your feedback is too short

Loading...