Backup Process with phpMyAdmin
Last modified: April 6, 2009 - 23:22
Here is another article that deals with this subject.
Backup Process with phpMyAdmin
The screen shots here are from phpMyAdmin 2.11.4, which I have on my local computer. Web hosts using different versions should look similar. They certainly produce exchangeable results.
- Log into phpMyAdmin on your server.
- Select the name of your database - or your Drupal database if you have several databases.
- 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.
- 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."
- Ensure that the SQL button is selected too.
- In the Structure section tick the following boxes: Structure, "Add DROP TABLE," "Add IF NOT EXISTS," and "Enclose table and field names with backquotes."
- 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.
- Tick the "Save as file" option.
- For now, select "None" for compression.
- 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.
Potential Issues You May Encounter
- PHP Limits Size of File Upload
In particular when you are restoring the database via upload this limitation may make PHPmyadmin difficult to use. Possible solutions:- Use one of the compression options above.
- Modifying your php settings to allow larger file uploads may also be possible, but discussion of that is beyond the scope of this document
- Deleting the cache and watchdog table records (leaving the tables) before doing the backup can reduce the file size. [need reference for how to]
- Splitting the download up by only selecting specific tables may also help

I'm not sure if this is the
I'm not sure if this is the correct way to export a MySQL database.
I'm doing it in a simplier manner and I believe I get the correct results.
What I mean ?
When I go to MySQL Databases (within cPanel) I can see, that my DB is 5.19 MB
When I use the export method, described on this page, I receive a SQL file of only 3.3 MB (according to FF)
When I use my method of export I receive a file about 5.8 MB (not sure why it appears bigger than in MySQL databases menu).
But anyway I'm almost sure, that your method didn't get all the needed data from the DB since I get a smaller than expected file.
Here is my method of export (I know it from my previous Joomla experience):
1. Go to phpMyAdmin
2. Select export
3. Select the desired database to export from the list
4. From the export options the only thing you need to do is to select the ADD DROP TABLE (from Structure)
5. Select Save As File option
6. Click on Go button
thas it :)
I'll be happy if somebody else can give his opinion, especially somebody experienced. Perhaps both methods are wrong? I dunno..
Or perhaps both methods are
Or perhaps both methods are correct... I don't think your method is significantly different.
Have you ever looked at an export file? It is a text form of your database with some control statements added, so its size would not have any direct bearing on the size of the database, except that I would expect it to usually be larger, unless you zip/gzip it (which I almost always do).
When I finish my project I'll
When I finish my project I'll be moving it to a different (from my test server) hosting and will give a real try to both methods to see if both are correct for production sites. When I do it I'll post here my findings.
Tested Successfully
I've used this method several times and it works perfectly.
Well...
In actuality, I have used "both" methods and can't really see any difference; both worked.
That's great to hear. Then
That's great to hear. Then possibilities to ruin your site are less. Glad to hear it, thanks.