Reputation: 31030
what's the best way to dump a large(terabytes) db? are there other faster/efficient way besides mysqldump? this is intended to be zipped, unzipped, and then reimported into another mysql db on another server.
Upvotes: 4
Views: 2083
Reputation: 13404
If it's possible for you to stop the database server, the best way is probably for you to:
Then move the copied files to the new server and bring up the database on top of the files. It's a bit complicated to do this, but it's by far the fastest way.
I used to be a DBA for a terabyte+ database in MySQL and this is one of the ways we'd do nightly backups of the database. mysqldump
would've never worked for data that large. We'd stop the database each night and file copy the underlying files.
Upvotes: 4
Reputation: 881653
Since your intent seems to be having two copies of the DB, why not set up replication to do this?
That will ensure that both copies of the DB remain in an identical state (in terms of data anyway).
And, if you want a snapshot to be exported, you can:
Upvotes: 0