ORIGINALLY POSTED BY Omen FOR THETAZZONE/TAZFORUM HERE
Do not use, republish, in whole or in part, without the consent of the Author. TheTAZZone policy is that Authors retain the rights to the work they submit and/or post…we do not sell, publish, transmit, or have the right to give permission for such…TheTAZZone merely retains the right to use, retain, and publish submitted work within it’s Network
PHPBB3 – backup & restore tutorial (this tutorial should apply to other forum/bbs on mysql)
For this tutorial we will use several methods to backup and restore mysql databases.
Since you are reading this guide and need to back the database then you may already have a running server or have it hosted somewhere, for those who don’t have a server here is some software to get you hosting.
These downloads are for Windows, but the back up process is more or less universal.
Wamp server: http://www.wampserver.com/en/download.php
PHPmyAdmin: http://www.phpmyadmin.net/home_page/downloads.php << this eases MYSQL administration by providing a web interface.
Please Read this tutorial from beginning to end first, I am not any good at writing and tend to write in parallel, so some stuff may apply to you some might not.
• Any forum mods for any forum/s, will molest the database and your forum: most mods aren’t updated or thoroughly tested, this means you will have to install exactly the same mods onto your forum for your database to work properly.
• Usually the new (restore) forum version and the mods version/s have to be the same version as the old (backup).
• Large SQL files are messy and a real pain to restore.
There are lots of ways to back up your phpbb, a full backup includes your entire phpbb directory and the full SQL database (or at least the part where phpbb was).
If your host backs up your site, then it should be a full backup. Backing up the database yourself isn’t so difficult, follow the steps.
1. The UI content (suggest a better name for the files, if you have one)
Use your favourite ftp client to download the entire phpbb directory and all its contents, this is needed if you installed any mods or would like to see any uploaded stuff in your restored forum.
Skip this if you Have PHPBB3 with SQL attachments & haven’t installed any mods.
2a. Backup SQL data – via PHPBB
SQL holds everything important, backing it up once in a while will save you hair and your friends (everybody hates re-registering for a failed/deleted SQL forum).
Lets assume you have your forum installed and running, log into the “administrators control panel” then select the “Maintenance” tab and click on “Backup” in the menu.
Select “Full” , “GZIP” , “STORE AND DOWNLOAD” , then click “SELECT ALL” and then click “SUBMIT”
Save the file somewhere.
That’s it you’re done.
NOTE: Ticking “Store and download” makes a backup in the “phpbb/store” (phpbb = where your phpbb is installed) directory so you can restore via the restore option.
2b. Backup SQL data – via phpMyAdmin
Most *nix web hosts will have phpMyAdmin installed, usually it’s only accessible via your host’s control panel. Click on phpmyadmin (in your control panel, could be found under database management) or http://yourdomain.com/phpmyadmin , so your screen looks like this:
Find your phpbb3 database in the “existing databases” list and click on it, then click on the export tab, you should see this:
Lets start clicking, click “SELECT ALL” (NOTE: if you have only one database with more than just phpbb3 then you need to select ONLY the tables beginning with “phpbb_”), then click in the “SQL” select circle, then click “SAVE AS A FILE”, then “ZIPPED” and lastly click the “GO” button to have a download pop-up, now save your phpbb SQL data somewhere.
That’s it you’re done.
3a. Restoring via PHPBB3
You will need to install phpbb3, keeping the phpbb3 administrator settings & table prefix the same as your previous forum !
After you have installed your forum, use your favourite FTP client to upload the “SQL” file to phpbb/store , look at picture to understand the directory structure.
Now, login into your phpbb “ADMINISTRATOR CONTROL PANEL”, go to “MAINTENANCE” tab, then “RESTORE”. If you have done the previous bit correctly you should see this:
If, however you uploaded the “SQL” files to the incorrect directory you will see this:
If you don’t see any backups, retrace your steps and learn the directory structure of phpbb/store.
If you do se a backup or two, select the one you would like to restore and click start restore.
That’s it you’re done !
3a. Restoring via phpMyAdmin
Lets go back to phpmyadmin, either through your hosts control panel or directly http://yourdomain.com/phpmyadmin
Select your pbpbb database from the existing databases and click on it, then click on the “IMPORT” tab, then click the “BROWSE”
Select your saved “SQL” backup file (either zipped, gzipped or plain sql)
and then click the “GO” button.
If you get “Import has been successfully finished, 212 queries executed.” displayed on this same page, then you have restored your pbpbb backup. The number of queries will vary according to the size of your forum.
I would like this tut to be informative and undestandable, comments & corrections welcome.
03 August 2008 – PBPBB Backup & Restore Tutorial Release