Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: itistoday on February 01, 2023, 09:32:23 PM

Title: Importing from old SMF database only
Post by: itistoday on February 01, 2023, 09:32:23 PM
I have a database in mariadb from an old SMF install (I think it was 2.0.x), but I don't have any of the original forum folders or files.

Is it possible to get up and running again with 2.1.x, using that old database? (So as to restore the forum back?)

If so, what's the best way of going about it?

Thanks so much for any help!
Title: Re: Importing from old SMF database only
Post by: Diego Andrés on February 01, 2023, 09:34:43 PM
Yes it's possible, you just need to setup the database, and then follow the upgrade steps.
https://wiki.simplemachines.org/smf/Upgrading
After upgrading, you'll likely need to run the repair_settings: https://wiki.simplemachines.org/smf/Repair_settings.php

You could also upload a clean set of 2.0.x files and do the repair_settings step first, and then upgrade to SMF 2.1
Title: Re: Importing from old SMF database only
Post by: itistoday on February 01, 2023, 09:37:46 PM
Thank you! I'll give it a try.
Title: Re: Importing from old SMF database only
Post by: Kindred on February 02, 2023, 12:15:00 PM
ummmm.....   there are going to be issues doing it that way.
If the directories and URLs in the database are not correct to start with, the upgrade will fail.

Properly, what you should do is install 2.0.19
then over-write the database contents of your installation with the contents of the saved database
then run repair_settings.php to reset paths, urls, etc.

Only when 2.0.19 is running correctly ---  THEN you can run the upgrade
Title: Re: Importing from old SMF database only
Post by: itistoday on February 02, 2023, 12:18:13 PM
Thanks for the caution Kindred!

Quote from: Kindred on February 02, 2023, 12:15:00 PMthen over-write the database contents of your installation with the contents of the saved database

How do I do this?
Title: Re: Importing from old SMF database only
Post by: Kindred on February 02, 2023, 12:49:41 PM
do you have the database as a database online or as a backup file?

If online, then go to your Settings.php file and CHANGE all of the database information in that file to the database info for your old database.

if a backup, then go into phpmyadmin in your host --     DROP all tables in the new database.
Then select import and give it the name of your backup file.
Title: Re: Importing from old SMF database only
Post by: itistoday on February 02, 2023, 04:38:30 PM
Thanks for covering both bases :)

Quote from: Kindred on February 02, 2023, 12:49:41 PMIf online, then go to your Settings.php file and CHANGE all of the database information in that file to the database info for your old database.

Yep, this is what I have - it's online, just sitting there, thankfully not deleted. I'll have to modify a fresh Settings.php file (since I don't have the original), and hopefully that's not a problem.

I'm switching back to SMF because thankfully it seems like SMF is usable again thanks to the Stop Forum Spam (https://custom.simplemachines.org/index.php?mod=4311) mod. Have already brought one forum back online. :D

Thank you guys for making this awesome free, open source forum. It's honestly the best on the Internet - just the spam stuff killed it (momentarily!).
Title: Re: Importing from old SMF database only
Post by: itistoday on February 02, 2023, 06:50:58 PM
I'm gonna mark this topic as solved, even though I haven't done this yet. I just needed this info in preparation for when I do end up doing it. I'll open another thread (or unmark it as solved) if I run into problems.

Thank you guys for your help!!
Title: Re: Importing from old SMF database only
Post by: Steve on February 03, 2023, 08:33:11 AM
Mark this unsolved instead of starting a new topic please.