Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: milan.major on May 20, 2021, 12:49:26 PM

Title: Help restoring forum content
Post by: milan.major on May 20, 2021, 12:49:26 PM
Hello guys!

I'm not an SMF expert, and not an IT expert either. I have a forum database dump back from 2010, az old text based rpg game that me and my friends played a loooong time ago.
I'd like to restore the forum. We don't have the files, the pretty design and whatnot, but that's not my aim, I just want to make the forum browsable and readable as it was back in the day.

Is there a way to do that?
Title: Re: Help restoring forum content
Post by: Kindred on May 20, 2021, 12:56:01 PM
sure.

Do you know what version of SMF was used back with the old site?   Was it a 2.0.x or a 1.1.x forum?


If 2.0.x, then it's easy.

Install 2.0.18 on your site.
Then drop all tables in the (new) database
restore the backup by importing it into the (now empty) database
download repair_settings.php from our site here https://wiki.simplemachines.org/smf/Repair_settings.php
upload repair_settings.php to your server
run repair_settings.php in order to reset the paths, directories, URLs, etc


your site should have been restored.
Title: Re: Help restoring forum content
Post by: milan.major on May 20, 2021, 06:31:23 PM
Apparently my dump is not a complete one, just a simple backup sql that assumes that the original forum, database and tables exist. So my dumpfile does not contain any CREATE TABLE stuff, nor the types of the columns, only a gazillion INSERT INTO arguments. Is there a way to still recover this?

Title: Re: Help restoring forum content
Post by: Sir Osis of Liver on May 20, 2021, 06:41:21 PM
Depending on what exactly you have, you can create a new database, do a clean forum install to populate it with tables, dump the database, then copy your content into the new tables using a text editor.  New db would have to be same version your old install was running.  Did something similar once to rebuild a large, trashed db.  Wasn't much fun, wouldn't do it again, but it worked.
Title: Re: Help restoring forum content
Post by: shawnb61 on May 20, 2021, 06:57:11 PM
If it is complete, you should be able to do an install, truncate the tables, and perform the inserts.

Title: Re: Help restoring forum content
Post by: lisukovigor492 on June 07, 2021, 10:39:36 AM
Depending on what exactly you have, you can create a new database, do a clean forum install to populate it with tables, dump the database, then copy your content into the new tables using a text editor.  New db would have to be same version your old install was running.  Did something similar once to rebuild a large, trashed db.  Wasn't much fun, wouldn't do it again, but it worked.

how do you create a new database there to transpose the old data at once?
Thank you
Title: Re: Help restoring forum content
Post by: Sir Osis of Liver on June 07, 2021, 12:56:25 PM
Assuming you know which 1.1 version you were running, you can do a fresh install with full install package for that version (https://download.simplemachines.org/index.php?archive), that will give you a clean database.  Empty all tables, dump the database, then you'd have to manually copy the inserts from the old database into the new one.  Maybe shawn knows an easier way to do it.  There were database changes in 1.1 branch, so it's important you use correct version.
Title: Re: Help restoring forum content
Post by: lisukovigor492 on June 15, 2021, 11:04:33 AM
Quote from: Sir Osis of Liver on June 07, 2021, 12:56:25 PM
Assuming you know which 1.1 version you were running, you can do a fresh install with full install package for that version (https://download.simplemachines.org/index.php?archive), that will give you a clean database.  Empty all tables, dump the database, then you'd have to manually copy the inserts from the old database into the new one.  Maybe shawn knows an easier way to do it.  There were database changes in 1.1 branch, so it's important you use correct version.

That is, can I do a fresh install with the full installation package for this version? is everything right?
Title: Re: Help restoring forum content
Post by: Sir Osis of Liver on June 15, 2021, 05:54:56 PM
Yes, you do full install with new database.  If version is correct, you'll have complete database structure containing default data.  Empty the tables, export the new db, then you can manually copy the inserts from your old dump into the new tables.
Title: Re: Help restoring forum content
Post by: landyvlad on June 15, 2021, 07:12:23 PM
I can't add anything to this thread other than my reading of it is that the following is necessary -

Do you know what specific version of SMF you were running the forum on when the backup was made?