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

[Xen-users] Re: 100% safe way to backup domU: (was Yet another backup)

To: Ligesh <myself@xxxxxxxxxx>
Subject: [Xen-users] Re: 100% safe way to backup domU: (was Yet another backup)
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Fri, 12 Jan 2007 03:28:14 +0000
Cc: Ulrich Windl <ulrich.windl@xxxxxxxxxxxxxxxxxxxx>, Roger Lucas <roger@xxxxxxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 11 Jan 2007 19:25:16 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070111211904.GA32543@xxxxxxxxxx>
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: <200610210406.25460.mark.williamson@xxxxxxxxxxxx> <200701112050.02112.mark.williamson@xxxxxxxxxxxx> <20070111211904.GA32543@xxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.5
> > I don't think you actually need to sync in the guest if you're doing
> > this, though.  You'll have all the dirty buffers in the save image
> > anyhow, so flushing them to disk doesn't seem necessary.
>
>   If we don't sync, we won't be able to mount and backup. If we were
> backing up the entire image, then yes, it will work without syncing.
>
>   xm save domU file
>   backup entire image + file
>   xm restore file
>
>   But if we want to mount and take proper incremental backup, we need the
> filesystem to be consistent. Otherwise we will get very badly corrupted
> data.

Do you have to backing up the files from inside the image, rather than the 
image itself?

I was assuming you'd just backup a copy of the block device (side note: for 
efficiency purposes you could use rdiff-backup to store binary deltas, 
organised by timestamp to do point-in-time recovery of disk images, without 
the overhead of storing complete copies).

If you don't keep a copy of the *exact* block device image, then you won't be 
able to restore the guest.  Just restoring by copying files from the backup 
onto the device and then resuming the guest will (very likely) destroy the 
filesystem completely - the block device image has to exactly what the guest 
is expecting.  If you write data to the block device image *at all* whilst 
the guest is suspended then you're risking destroying the FS.

If you really want to be able to mount the block device (and subsequently) 
restore individual changed data files, I'd suggest you drop the guest suspend 
part...  You may be able to sync and then mount, although I still think 
there's a chance that the resulting image will not be mountable (definitely 
can happen if you rely on userspace, possibly fixable with kernel support, 
but I'm not sure).

There's also a vague possibility of IOs being uncompleted in dom0 if a mere 
sync is implemented, and therefore not having hit the disk yet.  I'm not sure 
if there's a race here but it makes me uneasy :-(

Cheers,
Mark

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

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

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