[CentOS] best ways to do mysql backup

Sat Aug 14 20:39:54 UTC 2010
Markus Falb <markus.falb at fasel.at>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 14/08/2010 21:51, Agnello George wrote:
> we have multiple servers approx 10   and each has about 100 GB of data
> in the /var/lib/mysql dir , excluding tar , mysqldump and replication
> how do we take backup for these databases on to a remote machine and
> store them datewise , ( the remote machine is a 2TB  HDD )
> 
> currently tar  is not feasible as the data is too huge  and  the same
> goes with mysqldump

The problem i encountered with this kind of stuff is that huge backups
take a lot of time and that corresponds possibly (depends of used
backends maybe) to long downtime of the production instance. I generally
dont find it feasible to do backups on production instances.

Instead I suggest to set up a slave instance on another machine. The
Backup Procedure would roughly be like this:

* stop slave instance
* make lvm snapshot
* start slave instance again
* do whatever you want with the snapshot data (sorry!)

The Advantages as i can see are:

Backup peak I/O is moved away from the production instance. Of course
you have the constant replication overhead. As a variation you could
only start the replication thread periodically.

The production instance has not to be shut off, e.g. is not affected
directly by backups.

The slave instance could act as failover.

Regards, Markus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxm/xoACgkQYoWFBIJE9eVDlwCgv5Rnvs8P9/AS2iXSvnuqcgRv
yH0AnjpMeYWDzYw8t47nEtvkF7OnT/bz
=l7Av
-----END PGP SIGNATURE-----