tags:

views:

31

answers:

1

I was looking around for the best method to do an online backup of MySQL stored data.

I was no completely satisfied with the previous answers.

Im not asking for a specific method for now, I asking which "road" do you consider best.

Preferably it should be free and as easy as possible.

Thank you very much.

Ps: I hope this qualifies as a valid question for the site, if not, please DO tell.

Juan

A: 

Juan, if you cannot have downtime for table/row locking during backups, then I would consider implementing either MySQL replication or DRBD so that you have an "offline" host dedicated to backups, reporting, etc. Either way, once you have an offline, yet consistent copy of your master host, you can go down the road of mysqldumps, lvm snapshots, whatever your situation calls for.

Replication: http://dev.mysql.com/doc/refman/5.1/en/replication.html

DRBD: http://www.mysql.com/products/enterprise/drbd.html

MySQL LVM snapshots: http://www.mysqlperformanceblog.com/2006/08/21/using-lvm-for-mysql-backup-and-replication-setup/

randy melder
Thanks randy, I think the most viable immediately is LVM snapshots, I will take a thorough look it it and maybe later post some more specific questions. Thanks again!!
Trufa
LVM snapshots are thoroughly unreliable. It may work, it may work a while, but theres a very real chance the DB is in erroneous state if you try to recover with a backup taken _while there were still processes running on it_. It is a a teeny better then people just copying the datadir, but it has definite flaws.
Wrikken