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
  #2  
Old 08-04-2006, 02:30 PM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I stop the webserver, backup, start webserver.

I don't think you can do livebackups at this sizes anymore.
Reply With Quote
  #3  
Old 02-07-2007, 05:59 PM
kontrabass kontrabass is offline
 
Join Date: Feb 2002
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Orban,

Do you have a script that stops your webserver and does the backup, or do you do all of this manually every x days?
Reply With Quote
  #4  
Old 02-07-2007, 06:08 PM
firstrebel's Avatar
firstrebel firstrebel is offline
 
Join Date: Dec 2005
Location: West London
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I use mysqlhotcopy. It locks tables and backs up the db in seconds. See http://www.vbulletin.com/forum/showt...t=mysqlhotcopy

Bob
Reply With Quote
  #5  
Old 02-07-2007, 06:15 PM
kontrabass kontrabass is offline
 
Join Date: Feb 2002
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by firstrebel View Post
I use mysqlhotcopy. It locks tables and backs up the db in seconds. See http://www.vbulletin.com/forum/showt...t=mysqlhotcopy

Bob
That's what I use too, but with a 5 GB database it takes at least a few minutes - and leaving the forums on during this makes the mysql server hurl
Reply With Quote
  #6  
Old 02-14-2007, 05:38 PM
jason|xoxide jason|xoxide is offline
 
Join Date: Jul 2006
Location: Exton, PA
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you run a slave DB server you can run your backup on that without making your forums stop responding. One thing worth noting though is that it will make your forums look a bit off for a few minutes while replication backs up (new PMs show up on the count but don't appear, updated posts don't move to the top, etc.)...
Reply With Quote
  #7  
Old 02-24-2007, 04:37 PM
Amman-DJ.CoM's Avatar
Amman-DJ.CoM Amman-DJ.CoM is offline
 
Join Date: May 2006
Location: Athens
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

SSH Shell Account

its can take any huge size of DB in a Minutes WithOut Touching The CPU or OverLoad Server

Ask Your Host To Activate That Service

Note: Safe Mode Must Be Off in Order To Use SSH
Reply With Quote
  #8  
Old 02-24-2007, 11:27 PM
zagman76 zagman76 is offline
 
Join Date: Sep 2005
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Amman-DJ.CoM View Post
SSH Shell Account

its can take any huge size of DB in a Minutes WithOut Touching The CPU or OverLoad Server

Ask Your Host To Activate That Service

Note: Safe Mode Must Be Off in Order To Use SSH
Well - for big databases, you shouldn't be using the built-in backup or phpmyadmin...

ssh is always the way to go.

one of my boards has a db over 1GB, and I typically use a mysqldump to backup. It takes about 7 mins to complete.

I tried the mysqlhotcopy method, but I don't like that it dumps the files into a directory - makes it harder and more lengthy to download nightly.
Reply With Quote
  #9  
Old 03-05-2007, 03:18 AM
kontrabass kontrabass is offline
 
Join Date: Feb 2002
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jason|xoxide View Post
If you run a slave DB server you can run your backup on that without making your forums stop responding. One thing worth noting though is that it will make your forums look a bit off for a few minutes while replication backs up (new PMs show up on the count but don't appear, updated posts don't move to the top, etc.)...
Thanks Jason, I knew the time would come but was hoping to hold off another server purchase. Can't be avoided though. And it wouldn't hurt for searches. I just wish I hadn't signed a 2 year contract with my host. Now that they "have me", they know they can charge me up the wazoo for additional hardware. They're trying to slap a 40% overcharge on me (40% more than they charged me for identical hardware 6 months ago). Never sign a 2 year deal in this business
Reply With Quote
  #10  
Old 03-08-2007, 10:24 PM
eoc_Jason's Avatar
eoc_Jason eoc_Jason is offline
 
Join Date: Dec 2001
Location: Houston, TX
Posts: 493
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One thing I liked about EV1 (now The Planet) is there is no long-term commitment and the prices are great.

I have to agree with stopping the http service while doing the backup, or at least switching to another web server or something smaller (something that won't access the DB every connection) if you don't want your users to freak.

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.

You can try doing your backup at a different time. If you use MRTG to graph other stuff you can graph your forum users, then at the lowest usage point is the time to do your backups. I still have a lot of people on @ 2am... but between 4am-6am there are a lot less.
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:23 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.09271 seconds
  • Memory Usage 2,289KB
  • Queries Executed 23 (?)
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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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