MySQL Forums
Forum List  »  Backup

Re: Consistent tab delimited dump with mysqldump
Posted by: Rick James
Date: February 25, 2009 10:56PM

I shut down a good slave and copy the raw files over.

To copy the master...

The best way is via LVM snapshot, but you are probably not set up for that.

Next would come stopping all writes to the master while you do the mysqldump. 60GB will take hours. I would dump to the master's disk if there is room, then deal with getting the data to the other machine.

Another approach is to have a slave with empty databases. Then run (from any convenient machine):
mysqldump -h master -opt ... | mysql -h slave ...
(using pipe syntax -- works well in unix, not sure about windows)

Why tab-delimited? Tab delimited probably won't work as well as the default, which is CREATE TABLE... INSERT ..., and contains all the indexes, etc. (Indexes will be missing from tab delimited.)

You say "way too long"; have you tried the various options to turn off (and back on) foreign key checks, indexing, etc?

Then, once you have a "good" slave, stop mysql on it, copy the raw files, etc.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Consistent tab delimited dump with mysqldump
2763
February 25, 2009 10:56PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.