Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Big Board Discussions

Reply
 
Thread Tools
How to backup DB without overloading server? Details »»
How to backup DB without overloading server?
Version: , by kontrabass kontrabass is offline
Developer Last Online: Sep 2013 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 08-01-2006 Last Update: Never Installs: 0
 
No support by the author.

My DB is nearing 3 million posts, and I do not use fulltext searching. So my database is quite large (I do have attachments/images stored outside of the database though). I use mysqlhotcopy to do a nightly backup at 2am Central time. Problem is, my site stops responding for about 2 minutes at this time, and then for the next 3 minutes or so users get "server too busy" errors. The site is back up and running around 2:07am according to user reports.

I know this might seem like a small price to pay for a nightly backup... but my Australian visitors are getting a bit irked, as it happens every single day during their peak usage time.

My DB server is quite robust with dual opterons and 15k drives - during peak usage during the day loads never begin to reach .5. But the backup sure does overload things. Is there anything I can do to tweak mysqlhotcopy? Or some other means to do a reliable nightly backup? Thanks!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 03-09-2007, 08:27 PM
jason|xoxide jason|xoxide is offline
 
Join Date: Jul 2006
Location: Exton, PA
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by eoc_Jason View Post
Be aware that eventually even a master / slave setup will not be all that optimal for searching. It alievates the table locking issues but doesn't make searching any faster, and the more posts you have the slower searching will be. The best solution I found for searching was to switch to sphinx... the best change I ever made.
That is true, I have also switched my larger sites over to Sphinx. That's not to say though that there still isn't a use for the master/slave setup. Quite a few queries get offloaded to the slave (about 20% on my sites) and you can run backups without having to take the site down.
Reply With Quote
  #13  
Old 03-13-2007, 10:28 PM
GHDpro's Avatar
GHDpro GHDpro is offline
 
Join Date: Mar 2002
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

While a slave server might be the best solution, perhaps only backing up non-recoverable data might help. Our forum DB is about 1.1 gigabyte, but without indexes (both sql and vBulletin search index tables) it shrinks by about 400 Mb to just over 700 Mb.

Obviously rebuilding the vBulletin search index will take time though, so if you need to be back online fast, don't skip it in the backup. But rebuilding the sql indexes can be done relatively fast using myisamchk.
Reply With Quote
  #14  
Old 03-14-2007, 06:30 PM
jwocky jwocky is offline
 
Join Date: Mar 2005
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great thread,

I use MysqlDump myself and it seems to work relativly fast and efficiently, the way i have it now, it runs the dump while my forum is online during a slow time.

Im concerned that as the foum gets even bigger doing the dump while the forum is active may cause problems here and there

So I'm wondering if anyone knows a way to turn the forum off (from the command line) and then do the mysqldump.

My cron script would

1) turn off vbulletin
2) do mysql dump
3) turn vbulletin back on

any ideas on how to do step #1 and #3?
Reply With Quote
  #15  
Old 03-14-2007, 06:45 PM
kontrabass kontrabass is offline
 
Join Date: Feb 2002
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jwocky View Post
Great thread,

I use MysqlDump myself and it seems to work relativly fast and efficiently, the way i have it now, it runs the dump while my forum is online during a slow time.

Im concerned that as the foum gets even bigger doing the dump while the forum is active may cause problems here and there

So I'm wondering if anyone knows a way to turn the forum off (from the command line) and then do the mysqldump.

My cron script would

1) turn off vbulletin
2) do mysql dump
3) turn vbulletin back on

any ideas on how to do step #1 and #3?
If you're using mysqldump, https://vborg.vbsupport.ru/showthread.php?t=126925
Reply With Quote
  #16  
Old 03-15-2007, 12:14 AM
TheFrienzNet's Avatar
TheFrienzNet TheFrienzNet is offline
 
Join Date: Jan 2007
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kontrabass View Post
Yup, that mod is great. 200+ users online on a regular basis with over 100,000+ posts and this doesn't lag at all. I say, take this mod!
Reply With Quote
  #17  
Old 04-01-2007, 11:13 AM
bigbadbob0 bigbadbob0 is offline
 
Join Date: Mar 2005
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a web server and a separate DB server. The web server is also a write-only slave to the DB server. Since it's write only and vBulletin does far more reads than writes the extra load to run this slave is minimal. I've got 750,000 posts and 6,000 unique visitors a day.

I then backup the slave, using mysqldump in a cron job, during an offpeak time. Zero impact to users.
Reply With Quote
Reply

Thread Tools

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 12:38 AM.


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.07802 seconds
  • Memory Usage 2,259KB
  • Queries Executed 21 (?)
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
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete