Go Back   vb.org Archive > Community Discussions > Forum and Server Management
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-25-2011, 08:51 AM
Digma Digma is offline
 
Join Date: Nov 2004
Location: Netherlands
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Copying (backing-up) a database the other way?

After running into problems (with the postindex table) trying to restore a .sql dump into a new database using the command line option, I started looking at other options.

One of them was changing the vb based search to fulltext search, through the vbulletin options > search type, so I could flush the postindex table at some point. I ended up doing the fulltext search alteration in SSH as well, as our database (2.9m records in post) is apparently to large to process properly and don't make the roof come down on us. In the end it worked (after having taken more than 11 hours) and there is a difference in cardinality between the fulltext index and postid of about 1.5m.

Because of the difference between the postid and fulltext index cardinality, I was still reluctant to flush the table, but that would still leave me with the same problem, not being able to restore a backup into a new database (because of the postindex table messing up).

I then started looking at alternatives and wondered if it was possible to simple create a database and then copy the .opt, .frm, .MYD and .MYI files into the directory of the other database, set chown for all those files to mysql.mysql and work with that.

Now I actually tested this by creating 2 new databases and in one a table with just a few id's and names. I then copied the files, changed ownership and went into PHPMyAdmin and so far so good, it seems to work.

Right, I believe that I have found a solid way and less stressing way of copying/backing up a database this way, but is it??

What will happen if I approach the vb database in this manner (after closing the msg board first of course)? Will I run into problems in the long run, are there pitfalls? It just seems to good to be true. Any suggestions or advice on this part?
Reply With Quote
  #2  
Old 02-25-2011, 09:24 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It sounds like your mysql isn't well optmized for the queries you're running :/

People have run the older, normal vB3 fulltext, searches on larger forums than yours.
Reply With Quote
  #3  
Old 02-25-2011, 09:28 AM
Digma Digma is offline
 
Join Date: Nov 2004
Location: Netherlands
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Zachary, thanks for the reply.

Got two questions though:
1. Do you have any suggestions I should look into in order to get my MySQL properly optimized?

2. And on a second note, the option I suggested, (with the MYD, MYI, etc..) will this work as alternative or am I completely daft in thinking this?
Reply With Quote
  #4  
Old 02-25-2011, 10:14 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1. Post a sever optimization request over @ vBulletin.

2. You can use mysqlhotcopy
http://dev.mysql.com/doc/refman/5.0/...qlhotcopy.html
Reply With Quote
  #5  
Old 02-25-2011, 04:56 PM
Digma Digma is offline
 
Join Date: Nov 2004
Location: Netherlands
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, thanks for the advice. Will have a look at vb.com.
Reply With Quote
  #6  
Old 03-06-2011, 05:04 AM
SamirDarji SamirDarji is offline
 
Join Date: Apr 2004
Posts: 645
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Digma View Post
I then started looking at alternatives and wondered if it was possible to simple create a database and then copy the .opt, .frm, .MYD and .MYI files into the directory of the other database, set chown for all those files to mysql.mysql and work with that.

Now I actually tested this by creating 2 new databases and in one a table with just a few id's and names. I then copied the files, changed ownership and went into PHPMyAdmin and so far so good, it seems to work.

Right, I believe that I have found a solid way and less stressing way of copying/backing up a database this way, but is it??
When I was running vB in an intranet and had direct access to both servers I would do this all the time. Just be sure to shut down everything mysql, apache, etc. so that nothing can touch the files. Then they're just files.

It wasn't until I started my own public vb site that I learned that I couldn't do this anymore. And then had to learn to deal with phpmyadmin and other such tools.
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 12:27 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05594 seconds
  • Memory Usage 2,206KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete