FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » FUDforum 3.0+ » Recovering Database After Botched Upgrade
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Recovering Database After Botched Upgrade [message #164383] Wed, 02 February 2011 18:14 Go to next message
jm2morri is currently offline  jm2morri   
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
Hello everyone,

Something went wrong upgrading from 3.0.1 to 3.0.2 (I think it had to do with a popup window being blocked so I couldn't see that a consistency check was happening and then it got interrupted).

Anyways, I don't really know what I'm doing but I have managed to totally corrupt my forum. You can't get in the front door and even the admin login page won't accept my old credentials--I guess the credentials were stored in the db and corrupted as well.

Now I was smart enough to do a full dump before I started the install. But I can't figure out what to do with it. The dump was from 3.0.1 and the forum is now (after the upgrade) 3.0.2. I know there were db changes between the two.

I tried the command line instructions from

http://cvs.prohost.org/index.php/Import_forum_data

but they didn't help either--maybe they go with an older version?

Anyone out there have idea how to get my database back? I'd rather not reinstall everything and I don't think it should be necessary.

James.
Re: Recovering Database After Botched Upgrade [message #164384 is a reply to message #164383] Thu, 03 February 2011 01:36 Go to previous messageGo to next message
The Witcher is currently offline  The Witcher   United States
Messages: 675
Registered: May 2009
Location: USA
Karma: 3
Senior Member
Check your database and see if your user tables = 0?



"I'm a Witcher, I solve human problems; not always using a sword!"
Re: Recovering Database After Botched Upgrade [message #164385 is a reply to message #164384] Thu, 03 February 2011 10:38 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
The Witcher wrote on Wed, 02 February 2011 20:36
Check your database and see if your user tables = 0?



How? I can't get in via the web interface.

Remember, I'm no IT guru. I only know enough to be dangerous (as clearly evidenced by this situation).

James.
Re: Recovering Database After Botched Upgrade [message #164387 is a reply to message #164385] Thu, 03 February 2011 11:20 Go to previous messageGo to next message
The Witcher is currently offline  The Witcher   United States
Messages: 675
Registered: May 2009
Location: USA
Karma: 3
Senior Member
jm2morri wrote on Thu, 03 February 2011 04:38
How? I can't get in via the web interface.

Remember, I'm no IT guru. I only know enough to be dangerous (as clearly evidenced by this situation).

James.


No problem, you're not alone in not being an "IT guru" all of us have problems we need to learn how to solve and by doing so here we leave breadcrumbs others can read and follow!

Go to your host servers control panel and log in, there you should find your "PhpMyAdmin" link (I'm assuming you use a mysql database, which is the only one I am familiar with).

Once you are there your user table "fud30_users" should be about the 3rd one from the bottom, check it and see if it says '0".


"I'm a Witcher, I solve human problems; not always using a sword!"
Re: Recovering Database After Botched Upgrade [message #164391 is a reply to message #164387] Thu, 03 February 2011 15:22 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
The Witcher wrote on Thu, 03 February 2011 06:20


Go to your host servers control panel and log in, there you should find your "PhpMyAdmin" link (I'm assuming you use a mysql database, which is the only one I am familiar with).

Once you are there your user table "fud30_users" should be about the 3rd one from the bottom, check it and see if it says '0".


It reports "MySQL returned an empty result set (i.e. zero rows). (Query took 0.0003 sec)". That seems bad.

James.
Re: Recovering Database After Botched Upgrade [message #164392 is a reply to message #164391] Thu, 03 February 2011 16:42 Go to previous messageGo to next message
The Witcher is currently offline  The Witcher   United States
Messages: 675
Registered: May 2009
Location: USA
Karma: 3
Senior Member
jm2morri wrote on Thu, 03 February 2011 09:22
It reports "MySQL returned an empty result set (i.e. zero rows). (Query took 0.0003 sec)". That seems bad.

James.


Sounds like you took a different route to get there (I'd like to know how) but the end result seems to be the same.

For some reason the 3.0.2 upgrade seems to have a hiccup in it and deletes the user table or does not restore it properly.... At any rate it occasionaly gets gone and you can't log in.

Similar to: http://fudforum.org/forum/index.php?t=msg&goto=164058&#msg_164058

I have had the same problem a few times and to recover I needed to "install the previous version, import the dump, export the fud30_users table from the SQL, and during the recovery process (after upgrade) import them back into the SQL so that I had access to the forum".

Let me know if you regain access,

Considering that you said:
Quote:
Now I was smart enough to do a full dump before I started the install. But I can't figure out what to do with it. The dump was from 3.0.1 and the forum is now (after the upgrade) 3.0.2. I know there were db changes between the two.


You may need to delete the forum entirely, or if you are not comfortable with that create a whole new forum database and all to export the users table, at any rate you MUST import a ver 3.0.1 data dump into a 3.0.1 forum for it to work and then upgrade from there! keep your users table available until you are satisfied.

Read through the whole thread linked above particularly naudefj's recommendation to rerun the upgrade after deleting TV_1.






"I'm a Witcher, I solve human problems; not always using a sword!"
Re: Recovering Database After Botched Upgrade [message #164393 is a reply to message #164392] Thu, 03 February 2011 18:48 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
I read through the other threads, still not totally sure of all this.

My forums are back to 3.0.1 and running off the data dump (thanks to Frank's help).

So now I need to upgrade to 3.0.2 again. So are these the steps I should take?


    1) Put forum into maintenance mode so nntp syncing will stop (no new users or messages getting in between all this.

    2) Create full fudforum dump file again.

    3) Export fud277_users from mysql using phpMyAdmin web interface. Store in text SQL file.

    4) Drop (delete) the table fud277_tv_1 using phpMyAdmin web interface. Not sure what fud30_tv_1_i_t would be but it was mentioned in one of those posts.

    5) re-run the upgrade script.

    6) If users table has no entries, re-import the fud277_users table from file exported in step 3 above. Not really sure how to do this but I'm guessing it is obvious from phpMyAdmin.


Is that the process? If so, I'll give it a whirl..

James.
Re: Recovering Database After Botched Upgrade [message #164394 is a reply to message #164393] Thu, 03 February 2011 19:49 Go to previous messageGo to next message
The Witcher is currently offline  The Witcher   United States
Messages: 675
Registered: May 2009
Location: USA
Karma: 3
Senior Member
Sounds about right!

1. I don't quite understand 'nntp syncing" I'm not quite that knowledgeable about the higher end functions. But yes you would want new users and posts suspended for maintenance.

2. Yes you would want a current dump of your present forum!!!

3. Yes export users table (whatever you have it labeled as), I believe you would export it as a replace file, but I would make copies of replace and insert,... Check table block> Export> ensure only users selected> select export type (insert, update, or replace)> name file to be saved > check save as file block> GO.

4. TV_1 etc are temporary files as I understand it, and are replaced or used during the consistency checks.

5. yes.

6. Just click import and browse to the saved file.

That should do it, if nothing else it just supports the reasoning for making a dump before upgrading.

Good luck


"I'm a Witcher, I solve human problems; not always using a sword!"
Re: Recovering Database After Botched Upgrade [message #164395 is a reply to message #164394] Thu, 03 February 2011 20:24 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
Thanks for all the help. I'm up and running at version 3.0.2. This time, the user table didn't get corrupted.

James.
Re: Recovering Database After Botched Upgrade [message #164397 is a reply to message #164395] Thu, 03 February 2011 20:59 Go to previous message
The Witcher is currently offline  The Witcher   United States
Messages: 675
Registered: May 2009
Location: USA
Karma: 3
Senior Member
Good!
No it doesn't seem to be a consistent problem, I had it on one host but not another, but I'm glad you have it fixed.



"I'm a Witcher, I solve human problems; not always using a sword!"
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Condensed Categories displaying "opened" when clicked
Next Topic: Lost Forum Group "+" and "-" Image to Expand and Collapse Forum Category
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Apr 29 08:18:12 GMT 2024

Total time taken to generate the page: 0.02674 seconds