News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Reinstall but keep members/posts/threads/membergroups

Started by kittonium, June 26, 2018, 06:18:53 PM

Previous topic - Next topic

kittonium

Hi,

I fugged up my forum pretty hard and want to reinstall but keep members/posts/etc but delete everything else

can someone link me a guide to this?

kittonium

i already tried to use the whole old database on new forum but some garbage remains (installed packages that dont exist anymore, themes, etc)

Sir Osis of Liver

Too little info.  Did you delete the old forum files?  Have you uploaded a clean set of files?  Are you connecting to the database?  You'll have to reinstall any mods you were running, as well as themes if you deleted the files.  First clean up the install.  Delete non-existent themes (Admin -> Themes and Layout -> Theme Settings), and run fix_packages.php to clean up package manager.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

kittonium

Quote from: Sir Osis of Liver on June 26, 2018, 06:24:09 PM
Too little info.  Did you delete the old forum files?  Have you uploaded a clean set of files?  Are you connecting to the database?  You'll have to reinstall any mods you were running, as well as themes if you deleted the files.  First clean up the install.  Delete non-existent themes (Admin -> Themes and Layout -> Theme Settings), and run fix_packages.php to clean up package manager.

Hi, I'll try to delete all forum files, upload new 2.0.1.5, install, then run repair_settings.php to change database and then ill run package manager.

What im trying to do, is basically freshen up the forum, like theres probably tons of garbage left over in the database from old mods on the new forum

Sir Osis of Liver

Uploading clean files does not change the database.  Mod code is in the forum files, that's removed when files are overwritten.  Backup your files and db before you start.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

kittonium

Quote from: Sir Osis of Liver on June 26, 2018, 06:29:12 PM
Uploading clean files does not change the database.  Mod code is in the forum files, that's removed when files are overwritten.  Backup your files and db before you start.

Hi, i'm aware, i'm looking forward to somehow clean the database because i deleted all the files and going to upload fresh 2.0.15 files.

kittonium

FUG.. i tried to upload my old files (before i moved to php7) and tried to run 2.0.15 upgrade package

error'd out:
Quote
Deprecated: Function create_function() is deprecated in /var/www/vhosts/bigpackets.com/httpdocs/forum/Sources/Load.php on line 178

Deprecated: Function create_function() is deprecated in /var/www/vhosts/bigpackets.com/httpdocs/forum/Sources/Load.php on line 183

Deprecated: Function create_function() is deprecated in /var/www/vhosts/bigpackets.com/httpdocs/forum/Sources/Load.php on line 184

Deprecated: Function create_function() is deprecated in /var/www/vhosts/bigpackets.com/httpdocs/forum/Sources/Load.php on line 220

Deprecated: Function create_function() is deprecated in /var/www/vhosts/bigpackets.com/httpdocs/forum/Sources/Load.php on line 223

Deprecated: Function create_function() is deprecated in /var/www/vhosts/bigpackets.com/httpdocs/forum/Sources/Load.php on line 235

Deprecated: Function create_function() is deprecated in /var/www/vhosts/bigpackets.com/httpdocs/forum/Sources/Load.php on line 250

Deprecated: Function create_function() is deprecated in /var/www/vhosts/bigpackets.com/httpdocs/forum/Sources/Load.php on line 268

Fatal error: 'continue' not in the 'loop' or 'switch' context in /var/www/vhosts/bigpackets.com/httpdocs/forum/Sources/AdkPortal/Subs-adkfunction.php on line 1625

IDK. probably going to upload full new 2.0.15, install it, and... idk.

Sir Osis of Liver

You didn't mention upgrading.  What version are you upgrading from?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

kittonium

Quote from: Sir Osis of Liver on June 26, 2018, 07:10:58 PM
You didn't mention upgrading.  What version are you upgrading from?

well i'm not really upgrading, i just want to fully clean my SMF while also cleaning the database from all the unimportant.

this guy wants what i want: https://www.simplemachines.org/community/index.php?topic=155756.0

Sir Osis of Liver

<sigh> That guy was restoring 1.1.2 eleven years ago.  Which SMF version is your current forum?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Illori

you are running php 7.2 SMF does not support php 7.2, you need to downgrade your php version before you do anything any else.

kittonium

Quote from: Illori on June 26, 2018, 07:30:58 PM
you are running php 7.2 SMF does not support php 7.2, you need to downgrade your php version before you do anything any else.

are you sure? fresh install of 2.0.15 results in 0 errors.

kittonium

Quote from: Sir Osis of Liver on June 26, 2018, 07:27:37 PM
<sigh> That guy was restoring 1.1.2 eleven years ago.  Which SMF version is your current forum?

i dont want to restore, i just want to clean my database, my databases' version is 2.0.14

Sir Osis of Liver

You will have problems running 2.0.15 in php 7.2.  SMF currently supports up to 7.1, I run everything in 5.6.

What do you want to 'clean' from your database?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

kittonium

Quote from: Sir Osis of Liver on June 26, 2018, 07:43:51 PM
You will have problems running 2.0.15 in php 7.2.  SMF currently supports up to 7.1, I run everything in 5.6.

What do you want to 'clean' from your database?

Changed it to 7.1.18

I want to clean everything that isn't required by a vanilla SMF install. there are tons of things in there from old addons that i will never be using anymore and a HUGE cachelist by pretty urls

kittonium

Right now im cleaning (deleting) tables from phpmyadmin that dont look like they're from SMF.

kittonium

Are you guys sure there isn't a method to do this?

What about converting SMF database to like MyBB and then convert it back to SMF?

GigaWatt

Quote from: kittonium on June 26, 2018, 08:45:45 PM
What about converting SMF database to like MyBB and then convert it back to SMF?

That would be one of the worst choices you could make. If converting from one forum platform to another, you're bound to run into issues.

Quote from: kittonium on June 26, 2018, 08:00:19 PM
Right now im cleaning (deleting) tables from phpmyadmin that dont look like they're from SMF.

Here is a link to a post about a similar problem in another thread. Kindred corrected me in some parts, but it should work in your case too.
"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?"..."

kittonium

Quote from: GigaWatt on June 26, 2018, 08:55:56 PM
Here is a link to a post about a similar problem in another thread. Kindred corrected me in some parts, but it should work in your case too.

Could only salvage a few steps he did from there, I'm converting from 2.0.14 to 2.0.15 (basically no difference in the database) and im just trying to clean up the database, so everything would be fresh (nothing used from old db) and would like to keep only:

- members
- membergroups
- boards
- posts
- pms
- possibly also whatever needed for forum history (so you can view what kind of activity your forum had a few months or year ago)

Kindred

You really can't do that easily. There are things shared between multiple tables.

You can remove the prettyurls table, but seriously you should not be mucking about in the database
Сл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."

kittonium

Quote from: Kindred on June 26, 2018, 10:22:51 PM
You really can't do that easily. There are things shared between multiple tables.

You can remove the prettyurls table, but seriously you should not be mucking about in the database

done that before you posted your message :O

i imported only the biggest tables (posts, members, member_groups, permissions, etc), seems to be working so far, right now im doing the routines in Maintenance and see if it's good :)

also noticed some columns made by addons in the tables, going to remove them too soon

Kindred

So, in other words, no matter how much we tell you that it's a bad idea, you should not do that and you don't need to do that - you are going to do it anyway.

So, tell me again, why did you even bother to ask?
Сл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."

Aleksi "Lex" Kilpinen

Just out of curiosity, why? When nothing in the database is causing issues, I'd rather not go poking around it. The amount of space saved is gonna be rather small compared to all the stuff you want to keep, and the amount of work (not to mention risk of breaking things) is pretty big for that small saving.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

kittonium

Quote from: Kindred on June 26, 2018, 11:18:32 PM
So, in other words, no matter how much we tell you that it's a bad idea, you should not do that and you don't need to do that - you are going to do it anyway.

So, tell me again, why did you even bother to ask?

incase someone knew of a utility that helps clean a SMF database  :P
maybe this thread will inspire someone to make one..

Quote from: Aleksi "Lex" Kilpinen on June 26, 2018, 11:19:54 PM
Just out of curiosity, why? When nothing in the database is causing issues, I'd rather not go poking around it. The amount of space saved is gonna be rather small compared to all the stuff you want to keep, and the amount of work (not to mention risk of breaking things) is pretty big for that small saving.

well, i tried not deleting anything from the database and had issues with themes, and basically if i want to install some of the mods that i previously had, they would already be using the settings i have now, which probably isn't a good idea if  i install them way into the future.

either way, i have a backup of the forum and database before everything got fugged, so if the host allows PHP 5.4 or whatever it was at again it would be all good :)

kittonium

NVM.. IT LOOKS like it working, but its REALLY  not  ???


anyway, i made a few UniServerZ's, installed php 5 and php 7 on them and then went to php5 mode, loaded up the backup i have of my forum, uninstalled all mods, then changed to php7, and it worked.

so.... im thinking of uploading the modified backup back to the server :)


Sir Osis of Liver

Mods can add tables and/or settings to db.  When uninstalled, some remove tables/settings, some give you an option to do so, and some don't bother to clean up and leave stuff behind.  If you reinstall a mod that already has tables/settings in the db, it will inherit whatever content is there.  That's good if you want the mod to come up running as previously installed.  If not, you'd have to clear content and reconfigure settings, usually in mod cp.  If you don't reinstall the mod, the stuff it left in the db is ignored.  There's no harm in deleting tables that are obviously from a mod; messing with settings is really not a good idea, they don't cause any problems and take up very little space.

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

                                     - R. Waters

Advertisement: