News:

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

Main Menu

Is it possible to "reset" a smf installation but keeping all users, posts, etc?

Started by NiceLittleMonkey, February 13, 2013, 09:29:16 AM

Previous topic - Next topic

NiceLittleMonkey

Kindred > Thank you for the input. Some questions for you:

Quote from: Kindred on February 14, 2012, 01:17:08 PM
1- truncates/removes the error logs from the DB
2- truncates/removes the package list from the DB (thus marking all packages as "uninstalled")
3- removes (via delTree) any themes installed, other than default
4- removes all installed themes (other than default) and all member options from the smf_themes tables
5- removes the backup tar.gz files from Packages/backups
6- removes *.php~ files from the forum root, /Sources, /Themes/default and /Themes/default/languages
7- removes *.css~ files from Themes/default/css
8- removes most of the common hooks

- Would I run your script after restoring all the core files with the large update archive?

- (2) So now I don't need to do it manually?

- (3) We are currently using the "Core Theme". That will remain, correct?

- (6) Not quite sure I understand why?

- (7) Not quite sure I understand why?

Kindred

my script will restore all files from a ZIP called test_reset.zip.

I took the large upgrade archive file and removed things like the avatars and smilies directories and the actual upgrade files (upgrade.php and all of the .sql and other database files) and renamed it test_reset.zip

item 2 gets rid of the log of installed packages... item 8 gets rid of the commnly used hooks which packages use.

item 3 and 4---  I honestly don't recall... I only use the default theme (curve). I neve rliked core, so it is always the first thing that I delete...
Do note...   my script **DOES** remove all member-set options. They will be reset to the default options. This includes ALL member options and preferences...

items 6 and 7...   why? to clean up all the extra backup files that mods make when they install (but the mods are no longer installed, so why do you need the backup versions of those files?) same goes for item 5


Сл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."

NiceLittleMonkey

I have to admit that I didn't take my time to read your script before asking my questions last night. I have now downloaded and read your reset_site_21.php script. Couple of questions, if you don't mind:

1. This would be step one using the large upgrade file smf_2-0-4_upgrade.zip in my case, right?:

QuoteI took the large upgrade archive file and removed things like the avatars and smilies directories and the actual upgrade files (upgrade.php and all of the .sql and other database files) and renamed it test_reset.zip

2. About 1. By removing e.g. avatars and smilies directories I take it this means that the original directories will be preserved/left untouched, correct?

3. I see you are extracting the test_reset.zip to a specific folder. This would be the www root of the forum, correct?:

zip_extract('test_reset.zip','/home/turtleshell/www/test/');

On our host the root path is /var/www/web16/web/ so I'd modify your script to the below, correct?:

zip_extract('test_reset.zip','/var/www/web16/web/');

4. I now see you are removing the *.php~ and *.css~ files and obviously not the the *.php and *.css which was what I thought at first...  ::)




Kindred

1- yes
2- yes
3 yes...  (and oops... iddn't mean to hardcode my directory in there.  I'll have to fix that)
Сл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."

Arantor

-sigh- Remind me why we're doing this when it won't even fix the problem in question?

NiceLittleMonkey


Arantor

Back to the other topic. Resetting all the files won't actually fix anything, you're still going to have the situation you already have where the topic doesn't apparently have any messages, which is what causes the failure and that your first step should be to run the find/repair in the forum admin panel having done a backup.

NiceLittleMonkey

That is only the case for very few dead threads left in the forum. Everything about that is back in working order with threads and posts now. I just wanted to see if there was an easy way to delete threads in the database to clean up the remainders.

I have a copy of the forum up and running on a different host now, and it will stay there untouched.

I am now trying to get a copy of the forum up and running on a third host so I can perform a full reset test there. Want to see it succeed before doing it on the live forum.


Arantor


NiceLittleMonkey

I hear you. As soon as I have the third host up and running I'll update the other thread about the few dead threads. ;)

Arantor

I also wouldn't directly edit *anything* in the database. Well... that's not entirely accurate. *I* might edit things in the database but then again I know where all the related tangents are, where all the relations to topics and messages are, so I could go away and edit all those changes manually as well. It's not just in a single place.

NiceLittleMonkey

There. Problem with "dead threads" is solved. Thank you. Onwards with the "reset".  :)

NiceLittleMonkey

I marked this thread as solved, as the reset of the forum was successful.

I am now bugging Kindred in his thread about "removing most of the common hooks" in the database.  ;D


NiceLittleMonkey

If I didn't already say thanks for the support, then I'm doing it now:

Thank you all. Highly appreciated. :)

Advertisement: