PDA

View Full Version : Zipping databases seperately with LVM snapshot?



yosmc
June 18th, 2008, 06:07 AM
I have configured ZRM to do the backups from the LVM snapshot, which is pretty cool (=quick). Only thing I'm wondering is if it's possible to wrap up the databases seperately with this method. Right now I'm zipping a dozen databases together, and the resulting archive is several gigs large which isn't really handy. On the other hand it seems silly to take the entire snapshot ten times just to destill a different database from the lot every time.

Is what I'm looking for possible, or as that a useful feature still to be developed? Thanks!

zmanda_jacob
June 18th, 2008, 09:59 AM
If you create a backup set that has only specific databases in it, then you can back up just those databases. For example, add the line:

databases="db1 db2 db3"

To your mysql-zrm.conf file before you do the backup and it will then only copy those specific databases afterwards. You will have to configure different backup sets in order to do this, however. You can't just do it with one backup set and have the databases seperated.

yosmc
June 18th, 2008, 03:46 PM
If you create a backup set that has only specific databases in it, then you can back up just those databases. For example, add the line:

databases="db1 db2 db3"

To your mysql-zrm.conf file before you do the backup and it will then only copy those specific databases afterwards. You will have to configure different backup sets in order to do this, however. You can't just do it with one backup set and have the databases seperated.
Hm yes, but if I do it that way, ZRM will do a LVM snapshot every time (at least if I understand it correctly). For a dozen databases, it will do a snapshot of the entire disk 12 times, and each time it will zip the single database, and then delete the snapshot, only to make a new one five minutes later. Sounds like huge overhead to me, so what I'm wondering if ZRM can work with a single LVM snapshot, extract the individual databases from it and then delete it only once.