Advertisement:

Author Topic: Help restoring forum content  (Read 2847 times)

Offline milan.major

  • Newbie
  • *
  • Posts: 2
Help restoring forum content
« 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?

Offline Kindred

  • The Mean One
  • Lead Support Specialist
  • SMF Legend
  • *
  • Posts: 60,423
  • Gender: Male
    • Kindred-999 on GitHub
Re: Help restoring forum content
« Reply #1 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.
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."

Offline milan.major

  • Newbie
  • *
  • Posts: 2
Re: Help restoring forum content
« Reply #2 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?


Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 11,125
  • We were all equal in the end.
Re: Help restoring forum content
« Reply #3 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.
« Last Edit: May 20, 2021, 07:31:04 PM by Sir Osis of Liver »
“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 3,310
    • sbulen on GitHub
Re: Help restoring forum content
« Reply #4 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.

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline lisukovigor492

  • Newbie
  • *
  • Posts: 2
Re: Help restoring forum content
« Reply #5 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

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 11,125
  • We were all equal in the end.
Re: Help restoring forum content
« Reply #6 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.
“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns

Offline lisukovigor492

  • Newbie
  • *
  • Posts: 2
Re: Help restoring forum content
« Reply #7 on: June 15, 2021, 11:04:33 AM »
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?
« Last Edit: June 15, 2021, 12:26:12 PM by Illori »

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 11,125
  • We were all equal in the end.
Re: Help restoring forum content
« Reply #8 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.
“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns

Offline landyvlad

  • Sophist Member
  • *****
  • Posts: 1,006
  • Gender: Male
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: Help restoring forum content
« Reply #9 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?
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

To paraphrase Kindred: "There are no technical solutions to social problems."