To add to that ... there are a few nice handy tools which are nice to
have in the MySQL Toolkit (by Baron Schwartz) which can help verify
things in your setup after (checksums) ...
http://mysqltoolkit.sourceforge.net
http://mysqltoolkit.sourceforge.net/doc/mysqltoolkit.html
I have not run "mysql-archiver" before on anything but it also looks
like another nice option for your task + in general.
- Jon
On Sep 12, 2007, at 11:24 PM, Rob Marscher wrote:
On Sep 12, 2007, at 4:32 PM, tedd wrote:
While I thought it was going to be easy to make a copy (i.e., just
dump the database and reload it via phpMyAdmin) the database turns
out to be too large. So, what are my options? Any quick one line
solutions? Nothing I've read address the problem I'm facing.
I usually do what Hans suggested as well. Jon's point about
creating temporary tables with a subset of data and then exporting/
importing those is a good idea to limit the amount of data you need
to transfer and store in your dev environment... although if you
don't know the database well enough, you could miss copying the
necessary related rows from all of the tables.
Just a couple additions to Hans' suggestion:
If you are using MySQL 4.1 or greater, the default mysqldump
settings should work well. 4.0 and earlier need you to specify
some extra options to use extended insert statement syntax, turn
off indexing, don't buffer the results, and other stuff like that
-- but they updated mysqldump to default to those common options as
of 4.1. mysqldump --help will show you all of the variables/
options and their default settings on your machine.
You also probably want to pipe the dump to gzip or bzip2, transfer
that to your computer, and then uncompress and import.
1. mysqldump -hdbhost -udbuser -p dbname | bzip2 > db.sql.bz
2. transfer db.sql.bz
3. bunzip2 -k db.sql.bz
4. mysql -hdbhost -udbuser -p dbname < db.sql
-Rob
_______________________________________________
New York PHP Community MySQL SIG
http://lists.nyphp.org/mailman/listinfo/mysql
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php
_______________________________________________
New York PHP Community MySQL SIG
http://lists.nyphp.org/mailman/listinfo/mysql
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php