Backup Process with phpMyAdmin

Backup Process with phpMyAdmin

The screen shots here are from phpMyAdmin 2.9.2, which I have on my local computer. My web hosts have 2.9.0.2 and look very similar. They certainly produce exchangeable results.

  1. Log into phpMyAdmin on your server.
  2. Select the name of your database - or your Drupal database if you have several databases.


  3. The next screen will show you all the tables inside your Drupal database. Ignore those, and click the "Export" tab on the top set of tabs.


  4. Look at the left box at the top of the Export section. All the tables in the database you selected are in that box.
    • If you have other programs that use the database, then choose only those tables that correspond to your Drupal installation.
    • If you only have Drupal installed, in the left column, click "Select All."
  5. Ensure that the SQL button is selected too.
  6. In the Structure section tick the following boxes: Structure, "Add DROP TABLE," "Add AUTO_INCREMENT," and "Enclose table and field names with backquotes."
  7. In the DATA section leave the boxes inside this section unticked, but make sure to keep the check box next to the "DATA" heading checked. If any of the boxes is pre-checked, uncheck them.
  8. Tick the "Save as file" option, and leave the template name alone.
  9. For now, select "None" for compression.
  10. Now click "Go" and you should be prompted for a file to download. Save the file to your computer. Depending on the database size, this may take a few moments.


You have now backed up your database! (Not so bad, was it?)

Once that download is complete, you may check the "zipped" option, click "Go", and download the next file. If you want, you can download a backup in each of the compression formats. Your choice.

PHP limits filesize of upload

kdebaas - February 19, 2007 - 18:39

If you choose not to compress your download file, then double-check if its downloaded size is not bigger than the limit set in your PHP environment for uploading files. I once downloaded my Drupal database, dropped all the tables on the server and wanted to start over again by uploading the backup to the server. As the size of my backup was too big, I had some sweaty hours figuring out an alternative way of restoring my database, as I couldn't do this through the PhpMyAdmin interface anymore.

What's the Alternative?

maxfaction - January 15, 2008 - 16:36

What Alternative did you come up with to solve this problem? ...so that we may all benefit from your experience.

Well...

NancyDru - January 15, 2008 - 17:26

The first thing to try is compressing it; I generally get at least a 50% reduction doing this.

The next thing I would try is deleting the cache (all of them) and watchdog records (just leave the tables). This can afford a substantial reduction in the file size.

You can also figure out which are the biggest tables and split the upload up.

Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database

 
 

Drupal is a registered trademark of Dries Buytaert.