Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: rcane on July 04, 2024, 08:01:58 PM

Title: Need a primer on efficiently cleaning my forum
Post by: rcane on July 04, 2024, 08:01:58 PM
I need to delete old threads from the "recycle bin" board where they go.

Is there a way to efficiently remove threads and not leave traces.

I have plenty of boards to close now as the content is no longer needed and drive space could use some relaxing due to attachments. 

Title: Re: Need a primer on efficiently cleaning my forum
Post by: Kindred on July 04, 2024, 08:15:47 PM
Ok...

So, go into the recycle bin and delete them all...
Title: Re: Need a primer on efficiently cleaning my forum
Post by: Diego Andrés on July 04, 2024, 10:04:36 PM
You can also prune topics from the maintenance page. Just select the recycled topics board and delete them. I believe it also prunes the topics from other boards because it skips the recycled board 'step'. Just make sure to test it first or make a backup, I haven't personally used this feature.
Title: Re: Need a primer on efficiently cleaning my forum
Post by: Aleksi "Lex" Kilpinen on July 05, 2024, 12:33:59 AM
Quick moderation as checkboxes is usually my friend when I need to do something like this, can delete a page worth of topics at one go.
Title: Re: Need a primer on efficiently cleaning my forum
Post by: rcane on July 06, 2024, 12:55:58 PM
Quote from: Aleksi "Lex" Kilpinen on July 05, 2024, 12:33:59 AMQuick moderation as checkboxes is usually my friend when I need to do something like this, can delete a page worth of topics at one go.

I'll look at that too.

If you delete a board, what gets wiped along with it?  Topics and replies is my guess.   Does it also clear the tables in ways other than just the topics and replies?   What I mean:  are there other tables that have data related to topics and replies?
Title: Re: Need a primer on efficiently cleaning my forum
Post by: Kindred on July 06, 2024, 01:00:14 PM
There are a number of interconnected table data... 
if you were thinking about direct database edits...  please don't.


Honestly, unless you are talking thousands of threads, deleting a board to delete the threads is not a great plan.
Title: Re: Need a primer on efficiently cleaning my forum
Post by: rcane on July 06, 2024, 01:05:41 PM
Quote from: Kindred on July 06, 2024, 01:00:14 PMThere are a number of interconnected table data... 
if you were thinking about direct database edits...  please don't.


Honestly, unless you are talking thousands of threads, deleting a board to delete the threads is not a great plan.

Yeah that felt sketchy. 

So is there a way to delete topics, boards, or all the way up to a category and ensure the data is 1)gone (as it's unneeded) and 2)space freed up.
Title: Re: Need a primer on efficiently cleaning my forum
Post by: Kindred on July 06, 2024, 02:01:23 PM
If you delete the topics using the internal processes (like set moderation to checkboxes, select 100 threads and delete) -- then the system will correctly delete and clean up after itself.
Title: Re: Need a primer on efficiently cleaning my forum
Post by: Illori on July 06, 2024, 02:52:50 PM
Quote from: Kindred on July 06, 2024, 02:01:23 PMIf you delete the topics using the internal processes (like set moderation to checkboxes, select 100 threads and delete) -- then the system will correctly delete and clean up after itself.

this way they go into the recycle bin if enabled, so disable that before taking action.
Title: Re: Need a primer on efficiently cleaning my forum
Post by: GL700Wing on July 06, 2024, 05:56:49 PM
The Auto Purge Old Topics (https://custom.simplemachines.org/index.php?mod=2171) mod adds a scheduled task to check individual boards for topics that have not been replied to in a set number of days (configured separately for each board) and automatically removes them.
Title: Re: Need a primer on efficiently cleaning my forum
Post by: Kindred on July 06, 2024, 08:55:37 PM
Quote from: Illori on July 06, 2024, 02:52:50 PM
Quote from: Kindred on July 06, 2024, 02:01:23 PMIf you delete the topics using the internal processes (like set moderation to checkboxes, select 100 threads and delete) -- then the system will correctly delete and clean up after itself.

this way they go into the recycle bin if enabled, so disable that before taking action.

We were talking about topics that are already in the recycle bin
Title: Re: Need a primer on efficiently cleaning my forum
Post by: Illori on July 07, 2024, 05:32:35 AM
Quote from: rcane on July 06, 2024, 12:55:58 PMIf you delete a board, what gets wiped along with it?  Topics and replies is my guess.   Does it also clear the tables in ways other than just the topics and replies?   What I mean:  are there other tables that have data related to topics and replies?

this makes me believe it is not the recycle bin and it is other boards.
Title: Re: Need a primer on efficiently cleaning my forum
Post by: Kindred on July 07, 2024, 09:36:03 AM
Quote from: Illori on July 07, 2024, 05:32:35 AM
Quote from: rcane on July 06, 2024, 12:55:58 PMIf you delete a board, what gets wiped along with it?  Topics and replies is my guess.   Does it also clear the tables in ways other than just the topics and replies?   What I mean:  are there other tables that have data related to topics and replies?

this makes me believe it is not the recycle bin and it is other boards.

Actually, based on the previous conversations, I believe that they intended to load things into the recycle board and then delete that board.... :)
Title: Re: Need a primer on efficiently cleaning my forum
Post by: Arantor on July 07, 2024, 09:51:38 AM
This approach is firmly not recommended.

Serious question: how many topics are we talking about to delete? 100? 1000? 10000?
Title: Re: Need a primer on efficiently cleaning my forum
Post by: rcane on July 08, 2024, 12:08:54 PM
2000 topics. 14000 posts give or take.

The forum use has to pivot now and I need to free up space.

So, after a full backup I just want to ensure the most responsible way to purge and be rid of all those topics.

Title: Re: Need a primer on efficiently cleaning my forum
Post by: Arantor on July 08, 2024, 12:45:15 PM
Go into your preferences and set it to 50 topics per page, turn on quick moderation to checkboxes if it isn't already, and delete 50 at a time from the UI. 40 pages worth won't take long to do by hand.
Title: Re: Need a primer on efficiently cleaning my forum
Post by: PoML on July 08, 2024, 04:33:42 PM
Quote from: rcane on July 04, 2024, 08:01:58 PMI have plenty of boards to close now as the content is no longer needed and drive space could use some relaxing due to attachments.

From the numbers above, 2000 topics of text probably is not the issue but attachments are?
Have you considered using the admin option to prune attachments older than X?

Go to: Administration Center► Attachments and Avatars► File Maintenance

There are 3 simple options for pruning:


PS: realised that this menu may be changed in 2.1...  If so you should upgrade first :-D