[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] Xen, LVM and snapshots
Morten W. Petersen wrote: > > Well, what I was thinking, was to do a sync on the VM, and flush the > MySQL database and then immediately afterwards, taking a snapshot of the > system, backup that snapshot and then after backup "releasing" > (deleting) the snapshot. > Since now you're being specific on what you want to backup, you'd be more likely get a better response ;-) General backup strategies with mysql : - using mysqldump : works with all table type/engines, lock tables during backup - using innodb hot backup : works with innodb only, online backup possible - offline backup : shutdown mysql - copy files - startup mysql Those three methods can get you clean, consistent backup. Using file system snapshot (whatever the method is) will get you "consistent", dirty backup. "consistent", as in it depends on what engine you use (MyIsam tables will possibly be corrupted). dirty, as in some recovery method (which can run automatically, BTW) is needed (either myisamchk or innodb log replay). Now, considering the above implications, fs snapshot may not be desirable on certain situations. For example, if you back up a 50GB MyIsam table with fs snapshot, you'll most likely require several hours of myisamchk before it can be restored cleanly. On the other hand Innodb is ACID-compliant, so you can "safely" use fs snapshot with Innodb tables. > We're stuck with .18 for now, as that's what Debian comes with and we > try to stick with off-the-shelf packages. > > Do you think that's feasible? > If you still want snapshot-based backups I'd actually prefer to use zfs snapshot instead of Linux LVM snapshot. It's more reliable, more managable, and more efficient. If you use opensolaris dom0, you can snapshot dom0's zfs volume which acts as domU's storage. If you use opensolaris domU (whatever the dom0 is, including Debian), you can use zfs (either as root or just for data) on domU and create the snapshot there. If you use Linux domU, you can use zfs-fuse and have MySQL data files there. MySQL runs fine on zfs-fuse. Regards, Fajar Attachment:
smime.p7s _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |