WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] A simple backup

To: xen-users@xxxxxxxxxxxxxxxxxxx, Tiago Cruz <tiagocruz@xxxxxxxxxxxx>
Subject: Re: [Xen-users] A simple backup
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Thu, 8 May 2008 20:05:47 +0100
Cc: Nick Anderson <nick@xxxxxxxxxxxx>, Steve Spencer <sspencer@xxxxxxxx>
Delivery-date: Thu, 08 May 2008 14:10:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <48222125.4030405@xxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <48221AEF.50009@xxxxxxxx> <48222125.4030405@xxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.8.2
Hi there,

I wrote the blog post originally mentioned.

> > My question is, if I just want to backup the currently running vm's can
> > I just backup the disk images and config files or do I need to do as the
> > article suggests and also backup machine states and memory images?
>
> If you only need to be able to replace a few files then you dont need
> the machine states and memory image. If you want a "warm" backup of the
> full OS then you would want that memory state.

I'd like to just clarify this with a little more detail.

In general, it's impossible to guarantee that a disk snapshot taken - even 
atomically using a LVM snapshot - at an arbitrary point in time from outside 
the domU will be cleanly mountable.  It's at likely to require some kind of 
recovery operation; it's possible (though less likely) that such a snapshot 
could fail to mount at all.  I'd not be surprised if this approach often - 
even usually - works.  I'd just like to point out that it's not certain.

When you take an atomic snapshot of a domU's state, it's much the same kind of 
backup image as you'd get by yanking the power from a server, removing its 
hard drive and copying it byte-for-byte - often readable but definitely not 
clean.  That consistency problem is what makes it impossible to guarantee 
that such backups are definitely readable.

The advantage of backing up the memory state simultaneously is that the 
filesystem data that was currently in volatile RAM instead of on-disk is 
retained.  This means that you have everything you need to restore the guest 
to that point-in-time, then log in and access your backed up files.

This is not really ideal, since it's not always desirable to have to save a 
domain's memory state.  It would be nicer if you could somehow guarantee a 
consistent filesystem state on your disk snapshot.  I've been looking into 
how to do this and I believe it's quite possible to modify the code to 
support this properly.

Cheers,
Mark

PS.
Note that the above comments about disk backup all assume you're doing some 
kind of atomic backup operation, for instance snapshotting the domain's VBD 
from dom0, using LVM.  A simplistic approach like directly dd-ing or cp-ing a 
running domain's VBD is (as you'd expect) very unlikely to work reliably.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>