[Libguestfs] Point-in-time snapshots (was: Re: Inspection of disk snapshots)
Stefan Hajnoczi
stefanha at redhat.com
Fri Mar 27 15:21:25 UTC 2015
On Fri, Mar 27, 2015 at 12:31:41PM +0000, Richard W.M. Jones wrote:
> On Fri, Mar 27, 2015 at 12:15:34PM +0000, Stefan Hajnoczi wrote:
> > On Thu, Mar 26, 2015 at 12:02:27AM +0100, Kashyap Chamarthy wrote:
> > > So, something like?
> > >
> > > . . .
> > > { 'execute': 'drive-backup', 'arguments':
> > > { 'device': 'drive-virtio-disk1', 'sync': 'full', 'target':
> > > 'nbd://localhost', 'mode': 'absolute-paths', 'format': 'qcow2' }
> > > . . .
> > >
> > > Same question as yours, what is the NBD server going to run?
> > >
> > >
> > > My only NBD testing so far has been with w/ NBD over Unix socket or
> > > over TCP[**].
> >
> > For 'sync': 'full' mode qemu-nbd or nbd-server can be used as the
> > server. You probably don't want 'format': 'qcow2', just raw data over
> > NBD. That way the NBD server can implement whatever storage backend it
> > likes (raw, qcow2, something else).
> >
> > For incremental backup the NBD server would either be a qemu-nbd
> > instance with a qcow2 image and backing file:
> >
> > full-backup.img <- incremental-1.qcow2 <- incremental-2.qcow2
> >
> > Or the NBD server would be a custom backup application that does
> > something smart with the incoming NBD WRITE requests.
>
> What I care about is connecting libguestfs to qemu and reading a
> snapshot at some point in time, even though the guest is still writing
> away to its disks. Is this possible with drive-backup (or otherwise)?
Yes, that is what drive-backup does.
New writes coming from the guest are held up until the old data has been
written to the NBD target.
That way you get a point-in-time snapshot while the guest continues
running.
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20150327/f65acea0/attachment.sig>
More information about the Libguestfs
mailing list