PHP Bulletin Board Home
News About Home
Features of phpBB Test drive phpBB Downloads Support for phpBB The phpBB Community Styles for customising phpBB 3rd party modifications to phpBB

Support Home | Knowledge Base Home | Submit Article | Search Articles | Browse Articles
 Backup & Restore with phpMyAdmin 
Description: Guide about how to use phpMyAdmin as an alternative to the build-in backup & restore feature
Author: zeroK
Date: Sat Mar 01, 2003 4:30 pm
Type: HowTo
Keywords: backup,restore,phpMyAdmin
Category: Administrating
Where can I get phpMyAdmin and how do I install it?

You can get phpMyAdmin here: http://www.phpmyadmin.net
The package includes a Documentation.txt that explains how to install it on your server.
(Sorry, but this isn't meant as a tutorial how to install phpMyAdmin as this is already well documented.)

Backup procedure
Note: This tutorial is based on phpMyAdmin 2.5.4. The GUI of this tool changes from version to version but the basics have stayed the same for quite some time now.
  1. Open phpMyAdmin with your webbrowser and enter your database account data to access your database.
  2. Now you can see a drop down menu in the left frame of phpMyAdmin where you select your database.

  3. In the header of the right frame you should now see "Export". Click it Smile

  4. Now you see a multiline selection field where you can select tables to be backed up. If you select no table or all tables then the backup stores the whole database.
  5. Select on the right side the "Structure" and "Data" option and below the selection field "Add 'drop table'" , "Complete inserts" , " Extended inserts" , " Enclose table and field names with backquotes" and "Save as file". If you have also "zipped" and "gzipped" there you can get a smaller backup file Wink
    In the left field select "SQL" if it's not already selected.

  6. When you now click on "Go" a download popup should appear for your backup Smile


Restoration procedure
Note: This tutorial is based on phpMyAdmin 2.5.4. The GUI of this tool changes from version to version but the basics have stayed the same for quite some time now.
  1. Open phpMyAdmin with your webbrowser and enter your database account data to access your database.
  2. Now you can see a drop down menu in the left frame of phpMyAdmin where you select your database.

  3. In the header of the right frame there should be a button "SQL". Click it Smile

  4. Below a text field there should be a smaller field with a "Browse..." button on its right side. When you click it appears a file select popup. Here you select your database backup file and finally click on "Go".

  5. If there are no error messages that should have done it Smile


My backup is bigger than 1MB...
If your backup file is bigger than 1MB it is possible that it is too big to be uploaded in one piece with phpMyAdmin. The upload limit is different on every host, so better ask your host before making too many chunks of the backup Wink If your file is bigger than the allowed limit you have to split it up into smaller chunks.
There are some tools that can do it for you but we want to do it here the hard way Wink
  1. Open the backup file in a text editor that supports bigger files. For example VIM.
  2. Nearly every line ends with a ;. These are the points where you can split the file. Simply copy/paste everything after a specific ; into another file Smile
  3. Be sure to give those files useful names so that you can insert them in the right order into the database later Smile


Update (March 27, 2003)
For those who really don't want to do it on their own, here is a small tool for splitting database dumps. I have not tested it.
http://www.rasadam.com/download.php?file=rfsplitter.zip
(Thanks to R45 for the link.)

Update (November 25, 2003)
Readded the images and updated some descriptions to phpMyAdmin 2.5.4. If you find any mistakes please PM me.

For Questions about phpMyAdmin or for more information please consult the phpMyAdmin discussion fora or the mailing-lists.

Username: Password:
News | Features | Demo | Downloads | Support | Community | Styles | Mods | Links | Merchandise | About | Home
 © Copyright 2002 The phpBB Group.