[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Backup domU image at runtime



I agree totally.  This is why we are migrating to xcp.  The backup/snapshot is much better and easier to deal with as well as having little or no risk.

Be aware that snapshots on xcp are a little messy, but you can suspend a domain and do a full backup, which is a clean way to go.

 

That being said, just copying a running DomU is a high risk maneuver, but I’ve been doing this for over 4 or 5 years and have yet to have a restore fail to start.  Yes you are going to lose something.  If you are running a database, this is probably a bad idea. But if you are running an app server or web server, which I am, copying the DomU file has always worked for me.

 

-Todd Foster

 

From: xen-users-bounces@xxxxxxxxxxxxx [mailto:xen-users-bounces@xxxxxxxxxxxxx] On Behalf Of Alberto Asuero
Sent: Friday, March 09, 2012 3:15 AM
To: Andrea Monti
Cc: xen-users@xxxxxxxxxxxxx
Subject: Re: [Xen-users] Backup domU image at runtime

 

Todd H. Foster wrote:

Yes. Read my previous reply (hint: snapshot) 

 

I don't have LVM on this partition, I've a big RAID  5 (I'll try to migrate to LVM)

 

Simon Hobson wrote:

In a recovery situation, I can restore any individual machine to it's last backup with the following steps : 

In Dom0, create the LVM volumes, create filesystems, mount them.
Rsync the files back from the shared backup space.
Unmount the volumes from Dom0
Startup the guest.

 

It'd perfect but I can't pause certains guests it's a server of high availability...

 

I think my best options is :

 

1) Migrate to LVM and I'll try with snapshot

2) But I'll also keep the backup of files of each domU. 

 

With the option 2 (more security), I'll keep safe from a posible power supplies interruption (I've a UPS and a powervault redundance)

 

Thank you guys!

 

- - -
Alberto Asuero Arroyo

Software Engineer

(+34) 645 816 025




On Fri, Mar 9, 2012 at 11:13 AM, Andrea Monti <ilsuonogiallo@xxxxxxxxx> wrote:

 

2012/3/9 Simon Hobson <linux@xxxxxxxxxxxxxxxx>

Todd H. Foster wrote:

Yes, It has worked fine for me.  There may be some danger though. Centos handles it fine.

 

Not "may be some", but "there is a definite" danger.

If you make a backup of the virtual disk (by whatever means) from teh Som0 while a DomU is running then what you copy will be the equivalent of what you'd have on a real machine if you just yanked the power cord. Ie, you'd not include anything cached in the machine's memory and not yet written to disk.

 

That's not a theoretical risk, it is a most definite and demonstrable problem.



I think that taking a backup of a virtual disk while it is used is even worse: if you yank the power cord and you are using a journaled file system, the file system will probably recover by itself.
If you backup a virtual disk while it is used you are taking an inconsistent image of the journal and an inconsistent (corrupted) image of the files!

 


At one extreme, if you have a guest with little disk I/O (particularly writes), uses journalled filesystems, and you trigger the guest to flush it's write cache* before making a snapshot - then the risk would be low.


I think that the risk will always be high: you cannot be guaranteed that no process will write any file during the backup, and you have no way to check if the backup is working (the os will see the filesystem as ok, but application data could still be corrupted)

Andrea

 



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.