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
 Using phpMyAdmin and BigDump to backup/restore Databases 
Description: An up-to-date tutorial, meant to replace the outdated article by Zerok
Author: p3980
Date: Fri Dec 30, 2005 4:41 pm
Type: HowTo
Keywords: phpmyadmin,bigdump,backup,restore,database,export
Category: Administrating
So, you want to backup your database, eh? Perhaps you want to update your forums, or just be safe. Whatever the reason, there are some tools you'll need.
Tools Needed:
Backup
You're going to need a handy tool called phpMyAdmin, available here.. For this example I used Ver 2.7.0-pl2, but you should download the latest stable release available. You are going to want to FTP the package to your webhost. For the purpose of this tutorial, we're going to assume you uploaded the package in a folder called phpmyadmin.

Restore
To restore your database, you're going to probably need a tool called Bigdump, available here. Before you FTP this, you'll need to configure it. We'll get into that a bit later.

Using phpMyAdmin to backup your database
Some webhosts already provide phpMyAdmin. You're going to want going to want to skip the section on configuring phpMyAdmin. For the rest of you, read on!
Configuring
Go ahead and open up phpMyAdmin's folder, and look for config.inc.php. Open it up, and scroll down to:
Code:

$cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extension to use ('mysql' or 'mysqli')
$cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection
                                                    // (requires PHP >= 4.3.0)
$cfg['Servers'][$i]['controluser']   = '';          // MySQL control user settings
                                                    // (this user must have read-only
$cfg['Servers'][$i]['controlpass']   = '';          // access to the "mysql/user"
                                                    // and "mysql/db" tables).
                                                    // The controluser is also
                                                    // used for all relational
                                                    // features (pmadb)
$cfg['Servers'][$i]['auth_type']     = '';    // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user']          = '';      // MySQL user
$cfg['Servers'][$i]['password']      = '';          // MySQL password (only needed

You're going to want to change auth_type to cookie (it makes phpMyAdmin more secure), the host to the correct server (it is normally localhost), and fill in your username and password for phpMyAdmin. When that's done, close the file (save changes!), and FTP the phpMyAdmin folder to your server, and browse to the phpMyAdmin.
Using phpMyAdmin
If you did everything above correctly, you should see the following screen:



Go ahead and log-in. After log-in, you should expand the drop-down menu on the left. Select the database where phpBB is installed. Now, you're going to want to change to export mode. Chose "Export" from the row of tabs on the top. You're probably going to want to create a complete database backup, so you should probably click Select All below the textbox of table names. After doing that, you should see a screen something like this (Configure the rest of the options so they look like mine):



Now click Go. It'll ask you if you where to save your backup. Just save it to your desktop. (If your database is remotely large, it may take some time).

Restoring your DB with Bigdump
Mor information, instructions and the download for BigDump can be found Here.

Configuration
If you want to restore a backup, readon if not, you're done!
Now open up the folder with bigdump in it. It contains one file: bigdump.php. Open it, and find:
Code:

// Database configuration

$db_server   = "localhost";
$db_name     = "";
$db_username = "";
$db_password = "";

Fill that in with the correct information. Now, open up your FTP program. Create a directory (anywhere that you can browse to with your browser) called bigdump. Inside of it, put your database backup and bigdump.php. FTP it, and then browse to bigdump.php in your browser. You'll be presented with this screen:


Click "Start Import" next to your database backup. If no errors are presented, you restored your database sucessfully. Get back into FTP, and delete the entire folder "bigdump". If there was an error, go ahead and post it in the Support forum, and we'll help you out.

Congratulations! You've sucessfully backed-up and/or restored your forum database. Happy boarding!

EDIT: There is currently a MOD in Development/Validation which also overcomes the issue of "maximum execution time reached" and DB file size issue.
More details and the download for this can be found Here
CTCNetwork

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