Database corruption, how to use backup_smf_messages to get some data back?

Started by mrbandit, February 05, 2021, 10:30:04 AM

Previous topic - Next topic

mrbandit

A perfect storm of issues and situations caused my database to be corrupted and all of my backups to be deleted.  My only choice at this point is to use the data in the Backup tables to get some data back.  Is there a script available for this?  I was going to do a simple import, but the sql file is 200mb and the limit is 50mb.  Also, would I need to replace the topics table to match?  Thanks in advance!

vbgamer45

You might be able to zip up the sql via and use phpmyadmin to import it.

Or you can upload it y our website and import from a directory.

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

GigaWatt

Quote from: mrbandit on February 05, 2021, 10:30:04 AM
I was going to do a simple import, but the sql file is 200mb and the limit is 50mb.

Import it as zip or gz (GNU Zip). Remember to name it "name_of_db_file.sql.zip" or "name_of_db_file.sql.gz". Some hosts might "moan" about it not having the sql extension before the archive extension.

Quote from: mrbandit on February 05, 2021, 10:30:04 AM
A perfect storm of issues and situations caused my database to be corrupted and all of my backups to be deleted.

You didn't do local backups ???.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

a10

1st get a local backup on pc: all files\attachments, complete db, + an export of each individual table.

As mentionned above, get your host to fix things, from the given info it should take them just a few minutes. And 50MB..., maybe move to a useable host. btw, can't it be as simple as just renaming backup table(s) after deleting original?

Alt, if no individual table over that 50MB, import single table at the time from your backup and rebuild whatever is needed to get a complete db.

Tip, the old mysqldumper still works perfect (am using it with php 7.3), exports\imports only chunks of individual tables at the time, takes cares of any size and timeout problems. https://sourceforge.net/projects/mysqldumper/ + maybe newer, similar projects available on sourceforge.
2.0.19, php 8.0.23, MariaDB 10.5.15. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

mrbandit

Sorry about the late response, but thanks to everyone for their replies.  I was working with an older server, so I really needed to upgrade before doing anything.  I would like to try and get whatever I can get back from the backup tables.  The backup topics and backup messages are larger then my current active tables.  Do I need to restore them both to get the messages and topics back in sync?

There has been some posting in the meantime, so I don't really want to dump the tables and restore like that.  Can i just import right into the table with no issues?

Advertisement: