vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Big Board Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=172)
-   -   Cloning big databases - streamlining the process? (https://vborg.vbsupport.ru/showthread.php?t=170249)

Guest210212002 02-11-2008 08:15 PM

Cloning big databases - streamlining the process?
 
I'm copying the latest incarnation of my database onto my test platform so that I can run a test upgrade to the newest vB. The mysql import of the data has been running for almost 2 hours and it's still working on the post table. (ugh!)

Is there a better/easier way to go about this? I'd LOVE to just drop all the posts and copy everything else over, since I really don't need a copy of 1 million posts on my test platform. And if I hose this DB (which I very well might, since I'll be fiddling around) doing it all over again would really not make my day.

EricGT 02-12-2008 12:35 AM

For something like that, I'll usually turn off the primary database long enough to rsync the database binaries to the new location. It is much faster. Once a copy of the binaries have been made, you can overwrite the test DB over and over, as needed, and do so very quickly. If you are doing a DB dump, don't include the searchindex/postindex table and the attachments table, if you are storing attachments in the database. You probably won't need this info for an upgrade attempt. When I was still storing attachments in the DB, these two tables alone accounted for about 61% of my total DB size. Eric

Guest210212002 02-12-2008 02:26 AM

I do everything from command line, so when I dump my DB it's something like mysqldump (mydb) > dump.sql. Is there a way to skip the postindex/searchindex tables via command line? Or are you doing it with phpMyAdmin?

[high]* Guest210212002 is intrigued
[/high]

I'm not moving servers, just making a clone of my current site on the same box under a private subdomain so that I can run the 3.7 installer on it and see what breaks. :)

EricGT 02-12-2008 03:05 PM

Quote:

Originally Posted by Chris-777 (Post 1441156)
I do everything from command line, so when I dump my DB it's something like mysqldump (mydb) > dump.sql. Is there a way to skip the postindex/searchindex tables via command line? Or are you doing it with phpMyAdmin?

[high]* Chris-777 is intrigued
[/high]

I'm not moving servers, just making a clone of my current site on the same box under a private subdomain so that I can run the 3.7 installer on it and see what breaks. :)

Hello. You can use: '--ignore-table=name' to ignore a table in a DB dump. If you want to ignore multiple tables, you would use the directive multiple times. Run 'man mysqldump' or 'mysqldump --help' for more information. Eric

EricGT 02-14-2008 02:34 AM

Quote:

Originally Posted by EricGT (Post 1441502)
Hello. You can use: '--ignore-table=name' to ignore a table in a DB dump. If you want to ignore multiple tables, you would use the directive multiple times. Run 'man mysqldump' or 'mysqldump --help' for more information. Eric

Sorry, the syntax is actually: ' --ignore-table=database.name '. I forgot to put the DB name in there. I was just backing up my database and realized I had forgotten that. Eric


All times are GMT. The time now is 07:32 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.01156 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete