Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > General Hosting/Server Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Backing up large databases Details »»
Backing up large databases
Version: , by Krofh Krofh is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

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

Hey,
What's the best way to dump a huge database? Our server tends to crash at the very end of dumping... our site isn't too huge, but still pretty big (360,000+ posts). I haven't been experimenting too much simply because of not wanting to crash the site if I mess it up
- Jesse

Show Your Support

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

Comments
  #12  
Old 04-13-2006, 02:24 AM
The Chief's Avatar
The Chief The Chief is offline
 
Join Date: Aug 2005
Location: Montreal
Posts: 1,037
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Erwin
300 mb is relatively small. My database is 20 Gb. The chances of corruption is very high using indirect methods (I know from experience!).
A databse of 20gb, wow...lol
Reply With Quote
  #13  
Old 04-13-2006, 06:31 AM
kerplunknet kerplunknet is offline
 
Join Date: Jul 2002
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Erwin: You just "cp" the MySQL database(s) directory?

i.e.

cp -R /var/lib/mysql /other/cool/backup/directory

?
Reply With Quote
  #14  
Old 04-13-2006, 07:31 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Essentially. I do it in a script, rm -Rf the old directory, mv dir1 to dir2 etc to keep up with a whole list of backups etc., then cp.
Reply With Quote
  #15  
Old 04-13-2006, 11:02 PM
Krofh's Avatar
Krofh Krofh is offline
 
Join Date: Aug 2005
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the recommendations everyone... We're moving to our new server tomorrow. It's only a 300 MB database, so hopefully it shouldn't be too hard.
Reply With Quote
  #16  
Old 04-25-2006, 05:25 AM
parafieldtower parafieldtower is offline
 
Join Date: Apr 2006
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello guys, I'm in a rather serious situation here. My server has gone haywire and I can not do any SSH or FTP to it. The only thing that seems to be working is vBulletin. Everything else such as mail server or cronjobs are not functioning. What's worst is that all the database I backup every night are not accessible. What I need to do is to backup the current database (somehow) so we can re-instate the server to the beginning.

Now I have tried to download the file by using vBulletin's admin cp panel but I think because php has this timeout feature, it got to about 45MB and stopped. Database should be around 250MB. Does someone have any idea of how to do this? Can we modify this timeout feature by uploading a plugin script? I'm using vBulletin 3.5.4.
Reply With Quote
  #17  
Old 04-25-2006, 07:49 PM
The Prohacker's Avatar
The Prohacker The Prohacker is offline
 
Join Date: Oct 2001
Location: Dayton, Ohio
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by parafieldtower
Hello guys, I'm in a rather serious situation here. My server has gone haywire and I can not do any SSH or FTP to it. The only thing that seems to be working is vBulletin. Everything else such as mail server or cronjobs are not functioning. What's worst is that all the database I backup every night are not accessible. What I need to do is to backup the current database (somehow) so we can re-instate the server to the beginning.

Now I have tried to download the file by using vBulletin's admin cp panel but I think because php has this timeout feature, it got to about 45MB and stopped. Database should be around 250MB. Does someone have any idea of how to do this? Can we modify this timeout feature by uploading a plugin script? I'm using vBulletin 3.5.4.

If your server is having that many major issues, I would have your server provider mount the current disk as slave and install a new primary drive with a fresh install of the operating system of your choosing. I would then get the new server configured and start to just copy information off of the slave drive such as the database, files, logs, etc.
Reply With Quote
  #18  
Old 04-25-2006, 09:02 PM
COBRAws's Avatar
COBRAws COBRAws is offline
 
Join Date: Oct 2002
Location: Buenos Aires
Posts: 864
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Erwin
My database is 20 Gb.
Attachments and avatars in DB system?
is it vb.org?

xD

I just use SSH and do a mysqldump
Reply With Quote
  #19  
Old 04-26-2006, 07:53 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not vB.org.

No, attachments/avatars/profilepics etc is another 20 Gb, in the file system.
Reply With Quote
  #20  
Old 04-27-2006, 12:08 AM
ramprage ramprage is offline
 
Join Date: Oct 2003
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Prohacker how is the replication setup ? I'm not very famililar with this method.
Reply With Quote
  #21  
Old 04-27-2006, 04:03 AM
The Prohacker's Avatar
The Prohacker The Prohacker is offline
 
Join Date: Oct 2001
Location: Dayton, Ohio
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ramprage
Prohacker how is the replication setup ? I'm not very famililar with this method.

http://dev.mysql.com/books/hpmysql-excerpts/ch07.html

We have several database servers for our sites, so we have a single slave server called dbbackup. It runs multiple instances of Mysql all running as slaves replicating data from their respective master. From there we have a perl/shell script locks all tables on the slave process and copies all binary files and then unlocks all tables when done.

We actually have 6 master DB servers, so its rater interesting to get everything to replicate to a single server from which you can create backups.

This eliminates the table locking issue on the master server and possibly taking your sites offline for backups.

I highly recommend getting the book High Performance MySQL which the above chapter is from..

-Mat
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:30 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.05026 seconds
  • Memory Usage 2,305KB
  • Queries Executed 25 (?)
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
  • (4)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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