Imre Oolberg
2007-Aug-11 16:20 UTC
[Xen-users] using lvm snapshots for taking domU backups
Hallo! I guess this is a lot discussed topic of how to use lvm snapshots to get domU backups and i browsed lists archive, too. I still could be very thankful if anyone could comment on this. I consider setup where in dom0 are defined LVM volumes like this /dev/volume/domU_1_os /dev/volume/domU_1_mysql_data /dev/volume/domU_1_postgresql_data /dev/volume/domU_2_os ... and domU''s run from these volumes. Now, if i just take lvm snapshots in dom0 while domU is running i most probably get the resulting backups which after some self-recovery in filesystem and database datafile level run but this is dirty. So, what i consider doing is to 1. say to mysql and to postgresql respectively ''flush tables with read lock;'' and ''select pg_start_backup(''backup'');'' to make data filesystems settle down and be consistent 2. take in dom0 snapshots on data volumes 3. tell mysql and pgsql respectively ''unlock tables''; and select ''pg_stop_backup()''; 4. copy data from snapshots for backup or use these filesystem snapshots some other way 5. destroy snapshots This should sound more or less like a plan but i have doubts if it really works like this since i settle down filesystem access in domU and take snapshots in dom0. It means, should i rather set up things so that i can take snapshots too being in domU? Of course it means that there should be defined LVM''s in domU too and so to say there are two layers of LVM all together, one on top of the other which i''d rahter avoid unless necessary. Imre PS Backup for os partition is taken less frequently and when domU is taken down, for example. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users