Backing Up Your Drupal Database

Before you install any Drupal updates, you need to back up the database that operates behind your Drupal site. By doing so, you safeguard all the work you’ve done on your site. Your database contains:

  • All text content you’ve put on your site.

  • Settings for everything you’ve customized.

  • All user information, including logins and passwords.

To back up your database, follow these steps:

  1. Log in to your control panel, provided by your web host.

  2. Click the phpMyAdmin icon.

    You see the phpMyAdmin interface.

    Although phpMyAdmin is extremely common, not every web host has it. If you don't have the phpMyAdmin application, contact your web host and find out what resources it provides for backing up your database manually.

    image0.jpg
  3. Click the Export tab.

    This opens the Export database screen shown in the following illustration.

  4. Under the Export section, select the Drupal database.

    There may be more than one database in your list. The Drupal database may be named with your username on your web host site, or it may have Drupal in the name.

    The database name you used for the database you initially created at Drupal setup is the one to choose in this step.

    image1.jpg
  5. Under the database name, select the SQL radio button.

  6. Under Options section, select these check boxes: Structure, Add IF NOT EXISTS, Add AUTO_INCREMENT Value, and Enclose Table and Field Names with Backquotes.

  7. Also under the Options section, select these check boxes: Data, Complete Inserts, Extended Inserts, and Use Hexadecimal for BLOB Export Type.

  8. At the bottom of this page, click the Save as File button.

  9. For compression, select the Zipped radio button.

  10. Click the Go button.

    You may have to wait for a few minutes, but you’ll be prompted to save a file. This file is your database backup file, which you’ll need if you ever have to restore your database.

By default, this file has a generic name, such as localhost.sql.zip. Rename this file so you’ll recognize what it is later on; then save it in a location you’ll remember. You may want to use the date as part of the filename so you can always select the most recent backup if you do have to restore your database.

image2.jpg

blog comments powered by Disqus
Advertisement

Inside Dummies.com