Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin Tips & Tricks
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
How-To Delete the Contents of a Large Forum
Birched
Join Date: Sep 2007
Posts: 35

 

Show Printable Version Email this Page Subscription
Birched Birched is offline 09-21-2009, 10:00 PM

How To Delete the Contents of a Large Forum

At some point, many of us prune older threads in order to keep our database size manageable.

The most obvious way to delete a large forum (containing many threads, subforums, subsubforums, etc -- you get the idea) seems to be this:
AdminCP -> Forums & Moderators -> Forum Manager

That seems to work for smaller forums.

Unfortunately, according to my own experience and several other reports on this site, vbulletin.com, and others, this doesn't work for anything big. When I tried to delete a large forum representing just over half of my post table, total MYI file size ~2 GB, the script ran for almost 4 hours and then failed silently. It did unsubscribe people from the forum (and subforums), but not from the threads, nor did it delete anything (or, if it did, the amount of deletion performed was negligible). I found no trace of any error messages.

vBulletin support suggested that I go in and delete the subforums individually by hand. Unfortunately, there were over a thousand of them, and the interface is clunky at best. Spending the next 2 weeks deleting forums for 8 hours a day just wasn't going to work out.

To automate this job, one should instead start go to:
AdminCP -> Threads & Posts -> Prune

And prune threads. In our case, with a ~5 GB database and 4 GB of memory, I could process about 2000 threads at a time with successful completion. For me, this meant stepping through the thread 50 to 100 days at a time through its history (your rate of thread addition will likely be different, but the same general approach can be applied).

Once the forum I wanted to remove had less than about 10,000 threads in it (including in subforums), I was able to remove all of the rest of it the officially prescribed way, using forum manager.

And that's it! Sounds pretty simple, but if I'd run across a post containing this information earlier this weekend, I'd have saved hours of my time.
Reply With Quote
  #2  
Old 04-04-2013, 03:03 PM
matrex722's Avatar
matrex722 matrex722 is offline
 
Join Date: Jan 2007
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice informations
can you help me please
Prune Post Edit History Manager is not working in my admincp
i dont know how to use it
its always say there is nothing to do
Reply With Quote
  #3  
Old 04-04-2013, 03:21 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by matrex722 View Post
nice informations
can you help me please
Prune Post Edit History Manager is not working in my admincp
i dont know how to use it
its always say there is nothing to do
It may already be empty. Did you ever have it turned on and use it? If not, then there is nothing to do. See if there are any rows in your postedithistory table. If there aren't any, then there is nothing to do.
Reply With Quote
  #4  
Old 04-04-2013, 03:29 PM
matrex722's Avatar
matrex722 matrex722 is offline
 
Join Date: Jan 2007
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes postedithistory table is empty
see this only when i click over it in phpmyadmin

http://www.7elm3aber.com/up/images/7...6983326958.png

put there are many threads have edit history
and i want to delete them

i see it when i choose edit thread from thread options inside the thread
Reply With Quote
  #5  
Old 04-04-2013, 05:07 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

edit history is just showing an edit date on the bottom of the thread (table editlog). Post edit history is storing the contents of the posts as it is edited so you can go back and see what has been changed (table postedithistory).
Reply With Quote
  #6  
Old 04-05-2013, 07:44 AM
matrex722's Avatar
matrex722 matrex722 is offline
 
Join Date: Jan 2007
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you try it yourself here
go to Article Options or Thread Tools as it is in 3.8 translated and choose edit thread > perform action
and click save changes to confirm editing ( do not change any thing i dont want Birched hate me )
do it again go to Article Options you will see this



hahahah i saw it now when i changed language from arabic to english

its in moderatorlog i think not postedithistory table

so how can i remove them

and what will happen if i choose to empty moderatorlog table

i want to thank you so much for your interest
its big honor to me
Reply With Quote
  #7  
Old 04-05-2013, 03:32 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You may delete your moderator logs in admincp > statistics & logs > moderator logs > prune moderator log. If you prune them, you just won't see things in Edit Thread where it shows the moderator log (like in your image).

Why are you trying to do this? You are not going to be saving a bunch of database space by the actions you are talking about here.
Reply With Quote
  #8  
Old 04-05-2013, 04:14 PM
matrex722's Avatar
matrex722 matrex722 is offline
 
Join Date: Jan 2007
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its not about space
it works like a charm as you said admincp > statistics & logs > moderator logs > prune moderator log
thank you so much
and i hope i didn't bothered you
Reply With Quote
  #9  
Old 04-05-2013, 04:19 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Of course you didn't bother me.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:03 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04623 seconds
  • Memory Usage 2,276KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (2)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete