phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Trying to restore database


 
Search this topic... | Search General Support... | Search Box
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Author Message
pillowpc2001
Board Member



Joined: 14 May 2009

Posts: 4



PostPosted: Thu May 14, 2009 9:47 pm 
Post subject: Trying to restore database

I recently switched hosts and then switched back (long story), and I wanted to keep the posts/users from my phpBB2 forum, so I did a backup of my forums using the backup database option in the phpBB2 admin panel. I now have reinstalled phpBB2, and am trying to use the restore database function. After getting some errors the first time and having to make some changes to the file, I finally can get it to accept the file and it says it is successful - however, the posts and users do not show up.

Anyone know what's going on here?

Thanks!
Back to top
Acaria
Board Member



Joined: 20 Feb 2009

Posts: 238



PostPosted: Fri May 15, 2009 1:19 am 
Post subject: Re: Trying to restore database

If your database file is too large, it'll timeout and you may be only getting a few of the tables and such to restore.

I'd suggest going to your FTP and opening up the phpMyAdmin tool. Once your in, click the box with "SQL" written on it. A big text box should pop up, but there should be a "Browse" button somewhere in there.

Click that and select the zipped/gzipped file. If it asks you anything with "Unzip" in it, check that box. (If your file is not a .zip file and just a text document with a bunch of UPDATE commands everywhere, do this: Open in Notepad, select everything, copy it. Paste in the text box in the SQL window.)

Then just click Go and wait. Do NOT stop the process.

Once it's done, you'll just have to run a few SQL commands to update the database names. :3
Back to top
pillowpc2001
Board Member



Joined: 14 May 2009

Posts: 4



PostPosted: Fri May 15, 2009 2:48 am 
Post subject: Re: Trying to restore database

Thanks for the help. I copied and pasted the text in the box because I don't think the data was zipped... What SQL commands do I have to run after this? Sorry, I'm not too familiar with this MySQL stuff... icon_biggrin.gif
Back to top
Acaria
Board Member



Joined: 20 Feb 2009

Posts: 238



PostPosted: Fri May 15, 2009 3:02 am 
Post subject: Re: Trying to restore database

Use this SQL Query:

Quote:
UPDATE phpbb_config SET config_value = 'domain_name_here' WHERE config_name = 'cookie_domain';
UPDATE phpbb_config SET config_value = 'domain_name_here' WHERE config_name = 'server_name';
UPDATE phpbb_config SET config_value = 'path_to_phpBB' WHERE config_name = 'cookie_path';
UPDATE phpbb_config SET config_value = 'domain_name_here' WHERE config_name = 'script_path';


Just replace the blue with the appropriate settings.

(Little note: When changing the "domain_name_here", do not use http:// in it. If the site were Google, you'd put that as www.google.com exactly. Also, change the phpbb_ part to whatever you've named that.)
Back to top
pillowpc2001
Board Member



Joined: 14 May 2009

Posts: 4



PostPosted: Fri May 15, 2009 3:23 am 
Post subject: Re: Trying to restore database

Hmmm, still won't work... I wasn't sure about the phpbb_ instruction; I tried it 2 ways - keeping it like that, and changing it to "phpbb_forums" (what I set it up as), but neither worked. And for the phpBB path, I used a beginning backslash (ie "/forums"). Is this right?
Back to top
pillowpc2001
Board Member



Joined: 14 May 2009

Posts: 4



PostPosted: Fri May 15, 2009 3:01 pm 
Post subject: Re: Trying to restore database

Got it working - turns out I was using the wrong table prefix in the installation... Reinstalled with the correct one, and was able to do the restore the normal way.

Thanks for the help!
Back to top
Jim_UK
Board Member



Joined: 19 Nov 2008

Posts: 551
Location: North West UK


flag
PostPosted: Fri May 15, 2009 7:14 pm 
Post subject: Re: Trying to restore database

Acaria wrote:
I'd suggest going to your FTP and opening up the phpMyAdmin tool.


Just for info - ftp has no connection at all with phpmyadmin.
phpmyadmin is a bit of software that is usually supplied by your host and accessed via your hosting control panel using your browser (see no ftp)
Further more there are two of those entries in the sql that is posted that could give you wrong values. ie the domain name and script path are not the same. It pays to be 100% sure before posting. icon_wink.gif

The next time you do a backup do not use the inbuilt backup tool as it will more often than not time out with a database much over about 2MB.
Rather use phpmyadmin or mysqldump that is mentioned elsewhere on here.
An easy way to check is to open the sql file in "Wordpad" or anothet text editor and see what the last table is called.
It would usually be phpbb_words unless a mod has added one after that.

Jim
Back to top
Acaria
Board Member



Joined: 20 Feb 2009

Posts: 238



PostPosted: Sat May 16, 2009 4:38 am 
Post subject: Re: Trying to restore database

Jim_UK wrote:
Just for info - ftp has no connection at all with phpmyadmin.


That's just what I call the control panel for your host with all the links to everything. Sorry I don't use technical terms; self taught.

Jim_UK wrote:
Further more there are two of those entries in the sql that is posted that could give you wrong values. ie the domain name and script path are not the same. It pays to be 100% sure before posting. icon_wink.gif


And yet that exact same SQL query successfully completed my database transfer just last night? icon_wink.gif
Back to top
Jim_UK
Board Member



Joined: 19 Nov 2008

Posts: 551
Location: North West UK


flag
PostPosted: Sat May 16, 2009 7:18 pm 
Post subject: Re: Trying to restore database

The path to the phpBB2 if it is in a folder called "forum" is /forum so unless you have a domain called /forum something is wrong. icon_rolleyes.gif
domain_name_here and cookie domain are not the same thing always.
Take a domain that is http://mydomain.com The cookie domain for that is .mydomain.com (note the leading period). The cookie domain has two periods in it

I rest my case.

Jim
Back to top
Acaria
Board Member



Joined: 20 Feb 2009

Posts: 238



PostPosted: Sun May 17, 2009 7:00 am 
Post subject: Re: Trying to restore database

Nonetheless, that exact same SQL query I posted ran perfectly fine, yet we don't have a /forum in our domain.

As well our board cookies are running just fine.

So, you may rest your case and all, but the SQL query I posted works. >.>
Back to top
Display posts from previous:   
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0267 seconds using 15 queries. (SQL 0.0017 Parse 0.0009 Other 0.0241)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo