Resetting database defaults

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
TrZ
Registered User
Posts: 67
Joined: Fri Jul 24, 2009 6:53 pm

Resetting database defaults

Post by TrZ »

I have installed a lot of mods during the lifespan of my forum. Most of the mods, I no longer use, some I can't even remember what they are.
My question is, is there a way to drop all the extra tables and columns in the database while preserving the data of the default tables?

I guess I can manually check each table against a vanilla install phpbb3 db, but that is a rather tedious task. Is there a script or update file that I can run to just retain the default tables?

Cheers,
TrZ
Last edited by AdamR on Fri Aug 07, 2009 5:23 pm, edited 1 time in total.
Reason: Topic icon changed
User avatar
AdamR
Former Team Member
Posts: 9731
Joined: Tue Mar 02, 2004 5:40 pm
Location: Tampa, Florida
Name: Adam Reyher
Contact:

Re: Resetting database defaults

Post by AdamR »

Having extra tables unused really should not effect performance of your board. To remove all MODs:
  • Be sure you have a backup of your phpBB Files and database (ACP > Maintenance > Backup > Choose to download the file). If you are unable to get into the Admin Panel, see the "Database Backup" section of this article
  • Delete all of your phpBB files except config.php, images/, files/, and styles/
  • Upload a fresh copy of the phpBB 3.0.5 files except config.php, images/, and files/
  • Point your browser to install/database_update.php. If it completes successfully, delete the install/ folder.
  • Before viewing the board again, ensure that there is nothing but index.htm and .htaccess in the cache/ folder.
You may also want to grab the latest version of your style and upload that to ensure you have any and all changes in 3.0.5.

- Adam
phpBB Support: Welcome | Userguide | Knowledge Base | Search
Honored supporter of the phpBB Group!
"If I have seen a little further it is by standing on the shoulders of Giants." - Isaac Newton
User avatar
Tripp
Former Team Member
Posts: 1358
Joined: Sun May 20, 2007 5:14 am
Location: G'boro, North Carolina
Name: Tripp
Contact:

Re: Resetting database defaults

Post by Tripp »

Doesn't running the update_database script just update it, I don't think it deletes MOD tables and stuff but I could be wrong.

But the Support Toolkit can do just what you want:

http://www.phpbb.com/support/stk/
The box said 'You need Windows XP or better' .... so I installed linux.

Formerly Drugs
TrZ
Registered User
Posts: 67
Joined: Fri Jul 24, 2009 6:53 pm

Re: Resetting database defaults

Post by TrZ »

Well Adam as Drugs said, that doesn't remove the extra tables and columns. Just updates the current tables format.

And Drugs, I tried it on a test board, my db doesn't have the default prefix which is phpbb_ it has phpbb_sitename_ which gives the toolkit the impression that all the tables with that prefix shouldn't be there, so it flags them for removal. And it tries to create new tables with the default prefixes, which most likely will be empty afterward.
Do I have to manually go and change the table prefix on each table? Or is there n easier way?
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51593
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Resetting database defaults

Post by stevemaury »

The easiest way is to do what AdamR says and ignore the db changes, since they will be ignored by the php files.

I have reported as a bug your observation about the workings of the STK.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
TrZ
Registered User
Posts: 67
Joined: Fri Jul 24, 2009 6:53 pm

Re: Resetting database defaults

Post by TrZ »

Well steve, the reason I want to remove the excess tables is because the database is larger than it should be, only 6900 members and over 229MB, whereas on other forums that I'm also admin, they have over 10k members and their database is smaller in size :| .

Plus I have a lingering automod installation there which for one reason or the other messed up during a server move or sumthin and now i can't uninstall it or upgrade it. I tried deleting the mods table but it just won't go away.

So those are the reasons why I wanna reset the db defaults.

Thanks for the help so far.
TrZ
User avatar
AdamR
Former Team Member
Posts: 9731
Joined: Tue Mar 02, 2004 5:40 pm
Location: Tampa, Florida
Name: Adam Reyher
Contact:

Re: Resetting database defaults

Post by AdamR »

Users nor MOD tables will make up the majority of the size of the DB. For example, I have a populated test board with 10,000 dummy users. The user table is around 6MB in size. The mass information in the database will be occupied by the _posts and the 3 _search tables, all of which are several hundred MB. ;) There also may be lingering overhead on active and large tables, which can be recovered by optimizing the tables. This all depends on each individual board. I highly doubt cleaning up the MODs from the database will reduce the size of the DB to any significant amount.

At this moment in time, the STK is still in the testing stages and should not be used on a production board. Because of this, there is no "official" way to clean out the database of all non-vanilla tables and fields.

However, as has been said, deleting/replacing the files as was explained in my post above will remove any/all traces of the MODs from the files, and the tables in the DB will never be touched again. If you still want to remove the tables at a future time, the STK is working to be released as soon as possible. :)

- Adam
phpBB Support: Welcome | Userguide | Knowledge Base | Search
Honored supporter of the phpBB Group!
"If I have seen a little further it is by standing on the shoulders of Giants." - Isaac Newton
TrZ
Registered User
Posts: 67
Joined: Fri Jul 24, 2009 6:53 pm

Re: Resetting database defaults

Post by TrZ »

Okay, well I guess I need to rename the tables manually then try the stk again.


thanks for all the help guys :ugeek:

Regards,
snow
Locked

Return to “[3.0.x] Support Forum”