Jump to content

Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!

Toggle shoutbox Shoutbox Open the Shoutbox in a popup

@  yordan : (14 April 2014 - 05:28 PM) By The Way, This Could Be An Interesting Subject For A Topic, What About Posting This Question? Let's See If Other People Have The Same Feeling Concerning Bootlists!
@  yordan : (13 April 2014 - 09:36 AM) Boot Order : Cd, [Usb,] Hard Drive :D
@  yordan : (11 April 2014 - 07:23 PM) I Simply Let The Bios Do That
@  Ritesh : (11 April 2014 - 10:23 AM) Is It Possible To Launch Fedora Live Cd Or Installation Disk From Hard Drive On Windows Platform Using Grub Mbr File.
@  Ritesh : (11 April 2014 - 10:21 AM) No U Are Not.. Btw.. I Have Question For You.
@  yordan : (10 April 2014 - 08:02 AM) You Are Partially Right.
I Was Not.
Nevertheless, I Am Again :)
@  Ritesh : (09 April 2014 - 07:33 PM) :P
@  Ritesh : (09 April 2014 - 07:33 PM) I Think U R Not..
@  yordan : (09 April 2014 - 09:28 AM) I'm The Master Of The Shoutbox!
@  yordan : (05 April 2014 - 10:32 PM) He-He
@  Ritesh : (04 April 2014 - 06:59 PM) Ha Ha Ha ....
@  yordan : (04 April 2014 - 11:15 AM) Welcome Back, Starscream!
@  yordan : (03 April 2014 - 02:31 PM) And I Hope That He Will Come Back Soon :)
@  yordan : (01 April 2014 - 02:53 PM) Nice, Ritesh Came, I'm Not Home Alone Today.
@  Ritesh : (01 April 2014 - 08:51 AM) Oh!!! Poor Dear Yordan..
@  yordan : (31 March 2014 - 10:02 AM) I'm A Poor Lonesome Cow-Boy
@  yordan : (27 March 2014 - 02:22 PM) He Is Unpatient Due To His Patients!
@  Ritesh : (27 March 2014 - 10:46 AM) :(
@  Ritesh : (27 March 2014 - 10:46 AM) He Is Busy With His Patients.
@  yordan : (26 March 2014 - 08:12 PM) Ahsani, Where Are You?

- - - - -

Move Your Phpb2 Forum To Another Location Step-by-step instructions for backing up your phpbb2 forum and restore

1 reply to this topic

#1 yordan


    Way Out Of Control - You need a life :)

  • 4,745 posts

Posted 08 July 2006 - 07:26 PM

Step-by-step instructions for backing up your phpbb2 forum and restore it on another location.

Making backups is a very important task in computer work. Everybody knows that a backup is necesseray. You really need a mean of recovering from a disaster. A disaster can occur for many reasons, especially errors you could personnally make, like removing a file on astahost server or destroying a table in your database.
A backup of your file will allow recovering from a file-type disaster. A backup of your database will allow you to recover from data disaster.
You backup your astahost files using ftp, and you backup your data with database tools.
However, how can you be sure that your backup is correct ?
A backup you never tested is not a safe backup.
The best way to test your backup is trying to use your backup in order to move your forum to another location, for instance to another web hosting provider.
I tried this in order to be sure that my backups were correct, and I first found it tricky.
Of course, there are some papers describing how to do this, for instance here http://www.phpbb.com...nother location
After a couple of hours, I realized that things would have been far simpler if I had a set of step-by-step instructions. So, I decided to write my own one. I hope it will be helpful for some of us.


This jobs looks very similar to a disaster-recovery type backup test : reading the data on a system, and testing them on another one. So, let’s first clarify the naming conventions I will use hereafter.
I will name “old site” or “old forum” your current PHPBB2 forum at astahost, the one you are currintly reaching at an address like http://yourname.asta.../myfamilyforum/ . This site has a lot of posts in the forum.
I will name “new site” or “new forum” the phpbb2 forum you just create at a new location (let’s say at lycos or micromania or even on your own PC). This forum has no posts yet, and after

At any moment, you need to backup your current site. You never know, a catastrophy may occur. So, make your backup right now.
In order to perform this, connect to your phpbb forum, login as administrator, and go to the administration pannel.
Then, click on “backup”. Here is where the “backup” button is :
Posted Image


First of all, create a new site somewhere else, the ideal case is going to a completely new webhosting provider, for instance lycos. You don’t Lycos because it has too many ads? No problem, you simply want to test your backup-restore methodology, nobody else than you will see your new forum.
You can also install php and mysql on your own PC, using easyphp, which is an alternate method.
Install your new forum, and verify that you can connect to your new forum and to your forum admin pannel.
Just a small detail : at the end of the installation, you are asked to delete the “install” and the “contrib” foldes. Don’t simply delete them, simply rename them : rename “install” to “install_save” and rename “contrib” to “contrib_save”.


Use the forum admin control pannel in order to make a “just in case” full backup of your new forum database.
We will also make a partial backup, in order to save a single table. The reason is simple :
Right now, your new forum is empty, only the configuration table is important. We will make a backup of this table, using phpmyadmin. Your new site probably has a control pannel providing phpmyadmin. If you don’t have phpmyadmin, you can get it here : http://www.phpmyadmi...loads.php#2.8.2

Connect to your just installed forum, you see that there are no posts yet.
Posted Image
go to the administrator pannel.
Look at the values the installation script has installed, these settings are important for the rest of the migration job. Take note of the domain name and the script path name :

Posted Image
And also remember the cookie domain, the cookie name and the cookie path :

Posted Image


In your new forum administration menu, click the “restore database” button. You will be asked the name of the original backup you did at the very beginning.
Now open your new forum, you will see all your posts there !
Unfortunately, the job is not finished yet!


If your old forum was installed long time ago, it has probably been installed with an old veresion of php (for example my current production forum at astahost is release 2.0.15), whereas the new forum you will probably have a more up-to-date version, probably 2.0.21.
If this is the case, after restauring the old database to the new site, you simply have to run the script config_save/update_to_latest.php
If you forget this step and your original forum had a really old version, you could experience strange message errors like :

Error in obtaining userdata
SQL Error : 1054 Unknown column 'user_login_tries' in 'field list'
SELECT user_id, username, user_password, user_active, user_level, user_login_tries, user_last_login_try FROM phpbb_users WHERE username = 'zebigboss'
Line : 65
File : login.php

Once you finished updating, the work is almost finisthed.


Now, try to login to your new forum. You will see something strange : you wil notice that you are back to your old astahost forum !
This is due to the fact that, when restoring you old database, you also restored the old forum settings, and a lot of settings are redirecting to the old forum.
There are two ways of fixing this.


The simplest way is using phpmyidmin and restore the phpbb_config table from the backup you took from the new site fresh install.
This is the simplest and the fastest way. It will work immediately. Just a small detail : you will have to provide again the infos concerning the administrator avatar and the administrator signature.


The smarter way is using your old database backup, simply modifying the bad values from phpbb_config table. So, just after restoring your old database backup, using phpmyadmin, open the table phpbb_config and change the values of the domain name and the script path name, as well as the value of the cookie domain, the cookie name and the cookie path
Here below you can see where these values are located and how they look like. In my case the server_name is, the script_path is /forum/, the cookie_name is phpbb2mysql and the cookie_path is / :
Posted Image
Posted Image


Your work is finished now. Simply connect to your new forum, you will see that you are able to connect, to read all your posts exactly as there were in the old forum, you can perform adminstrative tasks, you see that you performed a perfect migration from your old forum on your old hosting provider, to your new forum on your new location. Seven easy steps allowed you to perform a perfect backup-restore test.
Now you know that you do have a perfect backup of your old site, and you do know how to restore it at any moment, to any location.

#2 Kardus


    Member [ Level 1 ]

  • Members
  • 41 posts
  • Gender:Not Telling

Posted 17 November 2006 - 02:04 AM

Thanks man, appreciate it. This will definately help me when I need to move my forum to astahost, or if I need to move my forum in the future.

Reply to this topic


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users