News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SMF corrupt and hacked, need to export and import an a new forum

Started by vanheckealain, January 23, 2020, 05:55:19 PM

Previous topic - Next topic

vanheckealain

Hi,
My forum has been hacked but it's still available. I've alredy made a repair but the issues are coming back.
So I've installed in another directory a new forum.
But now, I would like to export all data 'user, content, post, .... from the old to the new forum.
Both are using the same template and they are runing under the last version 2.0.17
Anyone can help me or explain me how to do it?
Thank you

Illori

take a look at https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files

do you know why/how your forum got hacked?

if so please take a look at https://www.simplemachines.org/about/smf/security.php

even if you dont but you still have the files and logs please submit the form.

SpacePhoenix

The first thing that you need to do is change your FTP password (there's no way of knowing if it's been compromised) with a strong password. Might be worth also changing the password that PHP uses when connecting to MySQL, the password used to log-in to phpMyAdmin as well (for both of them as well the new password should be a strong password)

vanheckealain

Hi Illori,
Thank you for you reply.
I've seen this topic. My issue is that I don't really trust what is on my DB because some thinks are not display as expected.
My goal was to be able to export in a way all the content via a file (xml or... )  and be able to import it. In a certain way the same as you can when you import /export on a wordpress website.

Thank you,

Sir Osis of Liver

The database is your content.  If you believe it's corrupt, and don't have an earlier backup, you can ask your host if they can provide one (good luck).  May be possible to fix the database, would depend on how badly it's damaged.  Best thing to do is import it into a clean install, see what you have.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

And no. There is no good way to import content from a text file
Сл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."

Shambles

My database exports/backups are always into a text file which can be edited.

vanheckealain

Thanks for all reply ! Very appreciate. I will go on this way and retry to import the "old" DB on the new installation.

Kindred

Shambles,  Your exports are saves as a .sql file. Although it is readable in a text editor, it is not actually a text file, since it is actually sql code

(the same as an html webpage is TECHNICALLY a text file)
Сл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."

Shambles

What a pile of rubbish. The files are standard text files and are easily edited using a text editor.

Sir Osis of Liver

I've rebuilt damaged databases in Wordpad, saved as plain text, works fine.

If it looks like a duck, and quacks like a duck ................
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

the thing is -- the user asked very specifically about importing from a file "like wordpress"

SMF doesn't do that, because the SMF database has way more interconnections between tables than WordPress.
In wordPress, you can import a user with a straight CSV/text file.
You can't do that in SMF.

YES.... you could create a SQL (which yes, is technically a text file) to do it... but it's not a simple task and would involve multiple tables and multiple columns...
Adding posts directly is even more fraught with complications.

So --  answering the ACTUAL question of the user:   No - don't do it.
Although an expert would possibly separate out content to be imported versus content that is not needed --   anything less than expert parsing could totally screw up your system



and no....   although they are TECHNICALLY text files (in that they can be edited in a text editor) HTML, SQL, Javascript are **NOT** text files in the respect that most people mean.
I mean, come on.... technically, C# code files are text files (I use notepad++ to edit them after all) -- but no one except a pedant would call them "text files"
Сл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."

Antechinus

Quote from: Shambles on January 27, 2020, 10:08:46 AM
What a pile of rubbish. The files are standard text files and are easily edited using a text editor.

Try saving one as .txt, and see how you go with an import. :D

Shambles


Sir Osis of Liver

Quote from: vanheckealain on January 23, 2020, 05:55:19 PM
My goal was to be able to export in a way all the content via a file (xml or... )  and be able to import it. In a certain way the same as you can when you import /export on a wordpress website.

I think OP just wants to know how to export/import the database, in whichever format works.  So, export it as .sql or .gzip using phpmyadmin (if it's not too large), import to new db with pma.  Or, backup db with cpanel backup (if available), restore it to new db same way.

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

                                     - R. Waters

Advertisement: