Restoration Help Needed- Database issues

Started by klra, May 16, 2014, 11:19:23 PM

Previous topic - Next topic

klra

SMF 1.1.19

I had a shared server issue with one of my 2 forums using too many resources of the server so my host shut it down.

At the same time (I didn't see this) the host stopped doing daily backups of any of my files because I had excessive inodes due to email notifications of Cron jobs. Once I saw that I deleted the notification emails and the inode issue was solved.

But a scheduled backup had not begun.

At the same time I get direction from my host that some database tables are excessive and they suggested reducing them.

I wasn't sure what that meant and while looking at the databases I mistakenly emptied a few log tables.

This completely wiped out the forums reference for what was what.

Now I know I should have backed up before I went into the phpMyAdmin to look at the databases but I didn't.

It get's worse.

I don't have a recent backup - the last backup I have is a complete backup from a few years ago (another bad/lazy admin practice- thought the host was taking care of that).

I have scoured the web & these forums & found many manual backup & importing of backups posts using cpanel/phpmyadmin, but not with a SMF Admin database backup file.

So I'm lost & need advice on which way to go. I could uninstall the forums and maybe restore the database but I don't know if that will work with a fresh install & a database from a heavily modded installation.

Any advice is most welcome.....  :-\

Sir Osis of Liver

Your host should be able to restore a recent db backup from their server backups, but they typically only keep them for a few days, so you need to contact them asap.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

klra

The host stopped doing server db backups of my section of the server when the inode issue arose. And the last backup they did got washed out in the next backup cycle.

They just contacted me & are going to see what they can do with my older SMF backups, but I'm still very worried that it's all lost.

Sir Osis of Liver

What is the most recent db backup that you have - file type, date, how was it made?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

klra

I have db backups created by SMF but the Admin at my host says they are corrupt.

Sir Osis of Liver

If you used the SMF admin backup, and especially if your db is large, it's very possible the backups are crap.  Do you know which tables you trashed?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

klra

Quote from: Krash. on May 17, 2014, 01:48:37 AM
If you used the SMF admin backup, and especially if your db is large, it's very possible the backups are crap.  Do you know which tables you trashed?


I pretty sure these got emptied-

smf_log_topics
smf_personal_messages

Kindred

well, that's not the end of the world then...

log_topics is only a log. it can be reset or recreated - and people might lose their "what has been read/unread"

personal_messages is just that....  a record of the pms.  again, not critical - the users just won't get their PMs restored.

topics, messages and users are the things you really care about.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

klra

How can I reset the tables?

The forums show a topic & post count but the topics & posts are not appearing.

The User list is complete & they can log in.

klra

I justs looked and it looks like the smf_messages got emptied too.

Kindred

then you are SoL...

You will have to restore from a backup and will lose any messages and users which ere added after that backup was taken.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

klra

I have a backup that was created from the SMF Admin Section but my host Admins say it is corrupted.

Is there any way to unpack the file and then add the missing tables (one at a time) to the DB?

Kindred

Unfortunately, no...

That's what I meant by SoL...   The smf admin backup is know to be a failure point on many servers. Read the wiki on backups.

At this point, though  there us nothing that can really be done
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Kindred

What? ???  That made no sense. This is a very specific issue to this individual admin.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

I suppose it's possible that two forum admins have emptied smf_messages without having a useable backup, but, oh, I hope not.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

klra

Currently I'm having a database pro look at the older backup file that I have to see if he can extract the tables for the missing smf_messages.

My plan is install a test installation and then import the tables to see if it will show the topics. If so, then I can export the topic list of the stickied topics and the member list & start over.

Also, if the SMF database backups are a known issue and basically worthless, the feature should be disabled by the SMF developer team so that Admins do not waste their time with it.

Kindred

1- the feature was fixed. but then ultimately removed from .21 sine there are better ways of doing it.
2- doing what you plan will fail.  The messages table points to the topics table, which points to other tables... restoring a single table will cause a whole load of errors and glitches
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

klra

What would be the minimum tables needed for me to recover the data on a test forum?

If the ones required are not corrupt then there is still a chance if the tables can be rebuilt.

Kindred

eveything except the log tables are required... the log tables can usually be rebuilt from inside the system once it's running
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

klra



klra

not yet.

I at least can extract all of the forum rules/guidance from one of the backups so I won't have to rewrite all of that.

One of the forums is up but the topics are gone.

The member list is correct though.

Can I export that from a 1.1.19 and import it to an new 2.0 installation?

kat

A full 1.1.19 database, in a v2 installation, will croak, for sure. :(

Although, you could backup and try importing just the `smf_members`table, to see what happens. If you have current members, in the v2 install, though, I'd assume they'd get nuked.

klra

I can't get saved smf_members to import properly.

kat

Maybe there are differences, then, which are too drastic?

Are you getting error messages that are helpful, by any chance?

klra

 MySQL said: Documentation

#1054 - Unknown column 'memberName' in 'field list'

Arantor

That's a 1.1.x style query looking at a 2.0 database (since in 2.0 the column is called member_name)

klra


klra

Do you think that I could do-

1 -install a fresh 1.1.19 installation
2 - import the member list to the new installation using phpmyadmin
3 - upgrade the 1.1.19 to 2.0.7 via the admin's panel

I would basically be starting the forum over from scratch.

Kindred

see... the thing is --- there is more than a single table involved in any one part of the system.
Importing just the members table will cause issues.
Importing just the messages table will cause issues.
Also, you can never upgrade form 1.1.x to 2.0.x from the admin panel

copy your database over
copy your settings.php and settings_bak.php files over
use the large upgrade archive fir 1.1.19 (but delete upgrade.php and all of the.sql files)
Run repair_settings.php
confirmt hat it is running.
then and only then should you do the 2.0.7 upgrade.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

klra

I don't have a working backup of the database.....

Kindred

then you are in really tough shape - there is not much that you are going to be able to do properly to restore your forum
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Herman's Mixen

Just thinking out loud, correct me if i am wrong... 1.1.x and 2.x

is it not that the Upgrade.php would create the table involved when its not there ?
then there is some solution maybe...

when the *.SQL and Upgrade.php are present
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

Arantor

The upgrader won't create one of the 1.1.x tables that didn't exist before.

Kindred

To be clear...   No.

The upgraded assumes that you have a working forum, it will not create new tables that may be missing and it will not update tables or fields that do not exist...  It will actually error out if the tables it is attempting to update are not present and populated.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Herman's Mixen

Oke, other loud one if the table is present without the data maybe possible to use the upgrader while the table is blank

i don't use smf myself anymore (it wont fit my needs), and my memory should be replaced :D
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

Kindred

Yes, that is probably possible.. But it will not help the original poster if she does not have the contents of the site in the database to start with...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Herman's Mixen

it was just a sugestion for a possible sollution in either way ;)
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

Kindred

Except it is not a solution, either way...   :p
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Herman's Mixen

No... but if have a *good* backup, there is a possibility to make it happed, in other words force your host to get a recent backup which is usable.. you are paying for a service isn't it.... for something useless ?!

If they made backups.. recent one !!
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

Arantor

Except the OP said they didn't have a good backup...

Herman's Mixen

i know thats why i said force, to maybe host have something which is ;)
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

Advertisement: