Category: Database

Back up and restore MySQL databases

Introduction

This information applies to Cruzio’s Website Hosting services. If you purchased Web and domain hosting with Cruzio after July 2006, you likely have Website Hosting services. Otherwise, you may have a Classic domain.

Many websites and Web applications use MySQL databases to store their content and settings. Learn how to protect your database by backing it up, and how to restore it in case of problems.

Back up your database regularly, so that you always have a recent copy to restore.

Be careful when restoring your backup to an existing database, since your backup will overwrite it. Make sure you are restoring the data you want to the destination you want. Otherwise, your website or application may become unusable.

Tools for backing up and restoring your database

Choose one of the tools below: Installatron, Control Panel Backup, or phpMyAdmin.

Installatron

Installatron is Cruzio’s one-click installer for Web applications, such as Joomla or WordPress.

Backing up with Installatron

  1. Go to http://login.cruzio.com and enter your domain name. Select “Control Panel” and click “Go”. Then log in with your admin username and password.
  2. In the sidebar, click the Installatron link.
  3. Your Web application(s) will appear. Find the one you want to back up and click its “create backup” button.
  4. The Installatron backup wizard will launch. Click the Next button to begin.
  5. Select the files, directories, and database tables you want to back up. Click Next.
  6. Click Submit.
  7. Click Complete.

Restoring with Installatron

  1. Go to http://login.cruzio.com and enter your domain name. Select “Control Panel” and click “Go”. Then log in with your admin username and password.
  2. In the sidebar, click the Installatron link.
  3. To the right of the Installatron page heading, click the My Backups tab.
  4. Your backup(s) will appear. Find the one you want to restore and click its “restore this backup” button.
  5. The Installatron restore wizard will launch. Click the Next button to begin.
  6. Select the files, directories, and database tables you want to restore. Click Next.
  7. Click Submit.
  8. Click Complete.

» back to top

Control Panel Backup

This backup tool is built into your control panel. It is limited to storing only a single backup per domain at any time.

The Control Panel Backup tool does not have a built-in restore function. You will need to retrieve your backup with an FTP application, and you will need to use phpMyAdmin to restore it.

Backing up with Control Panel Backup

  1. Go to http://login.cruzio.com and enter your domain name. Select “Control Panel” and click “Go”. Then log in with your admin username and password.
  2. In the sidebar, click Backup Your Account.
  3. Your domains will be listed. Click the small icon under the B (for backup) column for the domain you want to back up.
  4. Select the directories and databases you want to back up. Click “Backup now!”
  5. To schedule a recurring backup, in the list of domains, click the small icon under the S (for scheduling) column for the domain you want to back up.
  6. If “Disable scheduled backup” is selected, click its checkbox to deselect it. Select the items you want to back up, set a schedule (an asterisk means it will repeat every hour, day of the week, or day of the month), and enter an email address for notification. Click the Schedule button.

» back to top

Restoring with Control Panel Backup

If you are not familiar with FTP, follow our instructions for Website Publishing with Filezilla FTP.

  1. Open your FTP program, and connect to your Web host.
  2. Navigate to the “backups” directory.
  3. Your database backup is a file ending in the extension “.mysql”. Download it to your computer.
  4. Follow the phpMyAdmin steps below for restoring your database.

» back to top

phpMyAdmin

phpMyAdmin is a sophisticated tool for managing MySQL databases. It is as easy to destroy a database as it is to back it up. Use with caution.

If you have a Classic domain, you do not have the ability to restore any MySQL database backups. You may want to contact Cruzio and request a migration of your domain hosting to Website Hosting services.

Backing up with phpMyAdmin

  1. Go to http://login.cruzio.com and enter your domain name. Select “Control Panel” and click “Go”. Then log in with your admin username and password.
  2. Select the domain with the database you want to back up. If your Cruzio domain is on Host 6 or above, you’ll find the domain by going to the Main Menu on the upper left and clicking Domains.If you do not know what Host number your domain is on, after you log into your control panel, look at the address (URL) at the top of your browser. You will see it start with “https://host” followed by a number. That number is your domain’s Host number.
  3. Click the Databases icon. If you are on Host 1, 2, 3, 4, or 5, it will be under the Services section.If you are on Host 6 or above, it will be under the Applications & Services section.
  4. Choose your database by clicking on the database’s name.
  5. If you are on host 1, 2, 3, 4, or 5, click the “DB WebAdmin” icon.If you are host 6 or above, click the “Webadmin” icon.
  6. phpMyAdmin will open in a new window, so be sure your browser does not block pop-ups.
  7. In the sidebar of the phpMyAdmin window, click the database you want to back up.
  8. Toward the top of the page, click the Export tab.
  9. In the SQL Options area, under Structure, select “Add DROP TABLE” and “Add IF NOT EXISTS”. Leave all other options as they are.
  10. Near the bottom of the page, select “Save as file.” Optionally, in the “file name template” box, you can append the date, like this: __DB__01_01_2011
  11. At the bottom right, click Go.
  12. A file with the extension .sql should download to your computer. This is your database backup. Store it in a safe location.

Restoring with phpMyAdmin

  1. Go to http://login.cruzio.com and enter your domain name. Select “Control Panel” and click “Go”. Then log in with your admin username and password.
  2. Navigate to your domain’s Databases screen, as you did above in steps 2 and 3 of the backup procedure.
  3. Choose your database by clicking on the database’s name. If the database name does not already exist, create a new database by first clicking the “Add New Database” icon. Make sure the “Database name” matches the name of the database you are importing. Leave “Type” and “Database server” as they are and click “OK”.
  4. If you just created a new database in the previous step instead of clicking on an existing database, you will need to create an admin user before you can access the new database. Click the “Add New Database User” icon. For “Database user name”, make it match the name you just gave your database. For “New password” and “Confirm Password”, enter what you want your database admin password to be. When done, click “OK”.
  5. If you are on host 1, 2, 3, 4, or 5, click the “DB WebAdmin” icon.If you are host 6 or above, click the “Webadmin” icon.
  6. phpMyAdmin will open in a new window, so be sure your browser does not block pop-ups.
  7. In the sidebar of the phpMyAdmin window, click the database you want to restore to.
  8. Toward the top of the page, click the Import tab.
  9. In the “File to import” section, click the button to browse and choose a file from your computer. In the window that pops up, navigate to the .sql file you exported when you were backing up. Double-click the file to select it.
  10. Once you have located your .sql database file, double-click it to open it. The file importing window should close.
  11. At the bottom right, click “Go”.
  12. You should see a message near the top of the page, letting you know whether the import finished successfully.

» back to top

How to Access phpMyAdmin

This information applies to Cruzio’s Website Hosting services. If you purchased web and domain hosting with Cruzio after July 2006, you likely have a Website Hosting services. Otherwise, you may have a Classic domain.

» Classic phpMyAdmin Instructions

This help page explains how to access phpMyAdmin through your Website Hosting account. phpMyAdmin allows a user to create and manage databases, tables, fields, indexes, users, permissions, etc. Under no circumstances should you try to change an existing database if you are not aware of why it should be changed.

  1. Go to http://login.cruzio.com and enter your domain name, select “Control Panel” and click “go”. Then log into your control panel with your admin username and password.
  2. Select the domain on which the database you wish to access through phpMyAdmin is located. If you are on host 6 or above, this can be accessed by first clicking “Domains” under the Main Menu in the upper left hand corner.If you do not know what host number you are on, after you log into your control panel, look at the URL at the top of your browser. You will see it start with ‘https://host’ followed by a number. That is the host number you are on.
  3. For host 1, 2, 3, 4, or 5, look under the “Services” header and select “Databases”. For host 6 or later, look under the “Applications & Services” header and then select “Databases”.
  4. If you would like to create a new database, select “Add New Database” which is located below the “Tools” header and follow prompts.
  5. Under the “Databases” header, select which database you would like to manage.
  6. Find the “Tools” header and select “DataBase WebAdmin.” This will generate a pop-up window that will take you to phpMyAdmin. Be sure to disable any pop-up blockers you might have in place.
  7. Once phpMyAdmin is opened, select “Databases” which is a link located in the main window.
  8. Select the database name you would like to manage. You now have access to that database.

Repair a MySQL Table from phpMyAdmin

To fix a corrupted MySQL database:

  1. Through the domain Control panel, log into phpMyAdmin.
  2. Click Databases.
  3. Click the database name.
  4. At the bottom of the table list, select “Check All”, so you can operate on all the tables at once.
  5. In the “With selected” drop down, click “Check table”. This will report any issues your tables are having.
  6. Now go back one screen. Select the tables that are corrupt.
  7. From the “with selected” dropdown, click “repair table”.
  8. Use “check table” again to see if the database is repaired.