All of lore.kernel.org
 help / color / mirror / Atom feed
* Does XEN have any hot backup/snapshot features or plan?
@ 2009-04-05 23:47 zign
  2009-04-05 23:53 ` Thiago Camargo Martins Cordeiro
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: zign @ 2009-04-05 23:47 UTC (permalink / raw)
  To: xen-devel

Hello everybody,
  My name is Zign and I would like to ask a simple question.
  For example, I want to backup my VMs everyday. But I do not
want them to be stopped while the backup. For this reason, I can't
use a traditional way like:  freeze the VM  -> backup everything ->
restore the VM.
  So is there any solution for this?

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Zhao Yue
   Esaki Laboratory,
   Information Physics & Communication Engineering,
   Graduate School of Information Science and Technology,
   The University of Tokyo
Email: zign@hongo.wide.ad.jp
        zign@zign.cn

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Does XEN have any hot backup/snapshot features or plan?
  2009-04-05 23:47 Does XEN have any hot backup/snapshot features or plan? zign
@ 2009-04-05 23:53 ` Thiago Camargo Martins Cordeiro
  2009-04-05 23:54 ` Patrick Colp
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Thiago Camargo Martins Cordeiro @ 2009-04-05 23:53 UTC (permalink / raw)
  To: zign; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1043 bytes --]

Zing,

 You can use LVM2 as "virtual hard discs" for your virtual machines. So you
can use the LVM tools to backup, to make snapshots, etc...

 http://www.ibm.com/developerworks/linux/library/l-lvm2/index.html

Regards,
Thiago

2009/4/5 zign <zign@hongo.wide.ad.jp>

> Hello everybody,
>  My name is Zign and I would like to ask a simple question.
>  For example, I want to backup my VMs everyday. But I do not
> want them to be stopped while the backup. For this reason, I can't
> use a traditional way like:  freeze the VM  -> backup everything ->
> restore the VM.
>  So is there any solution for this?
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Zhao Yue
>  Esaki Laboratory,
>  Information Physics & Communication Engineering,
>  Graduate School of Information Science and Technology,
>  The University of Tokyo
> Email: zign@hongo.wide.ad.jp
>       zign@zign.cn
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>

[-- Attachment #1.2: Type: text/html, Size: 1746 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Does XEN have any hot backup/snapshot features or plan?
  2009-04-05 23:47 Does XEN have any hot backup/snapshot features or plan? zign
  2009-04-05 23:53 ` Thiago Camargo Martins Cordeiro
@ 2009-04-05 23:54 ` Patrick Colp
  2009-04-05 23:54 ` Brendan Cully
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Patrick Colp @ 2009-04-05 23:54 UTC (permalink / raw)
  To: zign; +Cc: xen-devel

It doesn't have this feature right now, but I'm currently working on a 
memory copy-on-write mechanism for Xen that can be used for taking 
snapshots of VMs (without needing to stop them). Used in combination with a 
disk snapshotting tool (like Parallax) you could create backups of your 
VMs. I'll be my initial implementation to this list very soon, in fact.

There are other people working on this sort of thing too (Mike Sun, for 
example).


Patrick


zign wrote:
> Hello everybody,
>  My name is Zign and I would like to ask a simple question.
>  For example, I want to backup my VMs everyday. But I do not
> want them to be stopped while the backup. For this reason, I can't
> use a traditional way like:  freeze the VM  -> backup everything ->
> restore the VM.
>  So is there any solution for this?
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Does XEN have any hot backup/snapshot features or plan?
  2009-04-05 23:47 Does XEN have any hot backup/snapshot features or plan? zign
  2009-04-05 23:53 ` Thiago Camargo Martins Cordeiro
  2009-04-05 23:54 ` Patrick Colp
@ 2009-04-05 23:54 ` Brendan Cully
  2009-04-06  0:16   ` zign
  2009-04-06  1:01 ` Rogerio Ferreira
  2009-06-14  8:48 ` Omar BENHAMID
  4 siblings, 1 reply; 9+ messages in thread
From: Brendan Cully @ 2009-04-05 23:54 UTC (permalink / raw)
  To: zign; +Cc: xen-devel

On Monday, 06 April 2009 at 08:47, zign wrote:
> Hello everybody,
>  My name is Zign and I would like to ask a simple question.
>  For example, I want to backup my VMs everyday. But I do not
> want them to be stopped while the backup. For this reason, I can't
> use a traditional way like:  freeze the VM  -> backup everything ->
> restore the VM.
>  So is there any solution for this?

I don't know of a complete tool, but the parts are all there. xm save
-c creates a checkpoint of a VM without destroying it, and LVM lets
you easily snapshot a disk. You can tie them together using the
external device migration hook in xend -- I think I posted a demo
script to this list many months ago that does this.

I can't remember whether xm save -c also supports --live in xend, but
if not it's a trivial change that can reduce the time that the VM is
paused for backup to almost nothing. The checkpoints may be larger in
that case, but they can be folded down to simple images afterwards. I
have a script somewhere around here that does this rewriting, but I
haven't used it in some time.

You might also think about running your VM on parallax, and saving its
images there too -- parallax can figure out the deltas between series
of images for you automatically.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Does XEN have any hot backup/snapshot features or plan?
  2009-04-05 23:54 ` Brendan Cully
@ 2009-04-06  0:16   ` zign
  2009-04-06  0:24     ` Brendan Cully
  0 siblings, 1 reply; 9+ messages in thread
From: zign @ 2009-04-06  0:16 UTC (permalink / raw)
  To: Brendan Cully; +Cc: xen-devel

Mr Brendan Cully,
Thank you for your fast reply!
LVM + checkpoint sounds reasonable, but there is problem:
if the storage and the MEM checkpoint are not saved in the
very same time, I am not sure if this is a "correct" snapshot.
You mentioned something about the migration hook that can tie
the MEM checkpoint and the LVM snapshot together. Can this
migration hook ensure that there is no "time-shift" between the
MEM and storage?

Brendan Cully 写道:
> On Monday, 06 April 2009 at 08:47, zign wrote:
>   
>> Hello everybody,
>>  My name is Zign and I would like to ask a simple question.
>>  For example, I want to backup my VMs everyday. But I do not
>> want them to be stopped while the backup. For this reason, I can't
>> use a traditional way like:  freeze the VM  -> backup everything ->
>> restore the VM.
>>  So is there any solution for this?
>>     
>
> I don't know of a complete tool, but the parts are all there. xm save
> -c creates a checkpoint of a VM without destroying it, and LVM lets
> you easily snapshot a disk. You can tie them together using the
> external device migration hook in xend -- I think I posted a demo
> script to this list many months ago that does this.
>
> I can't remember whether xm save -c also supports --live in xend, but
> if not it's a trivial change that can reduce the time that the VM is
> paused for backup to almost nothing. The checkpoints may be larger in
> that case, but they can be folded down to simple images afterwards. I
> have a script somewhere around here that does this rewriting, but I
> haven't used it in some time.
>
> You might also think about running your VM on parallax, and saving its
> images there too -- parallax can figure out the deltas between series
> of images for you automatically.
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>   


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Zhao Yue
  Esaki Laboratory,
  Information Physics & Communication Engineering,
  Graduate School of Information Science and Technology,
  The University of Tokyo
Email: zign@hongo.wide.ad.jp
       zign@zign.cn

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Does XEN have any hot backup/snapshot features or plan?
  2009-04-06  0:16   ` zign
@ 2009-04-06  0:24     ` Brendan Cully
  0 siblings, 0 replies; 9+ messages in thread
From: Brendan Cully @ 2009-04-06  0:24 UTC (permalink / raw)
  To: zign; +Cc: xen-devel

On Monday, 06 April 2009 at 09:16, zign wrote:
> Mr Brendan Cully,
> Thank you for your fast reply!
> LVM + checkpoint sounds reasonable, but there is problem:
> if the storage and the MEM checkpoint are not saved in the
> very same time, I am not sure if this is a "correct" snapshot.
> You mentioned something about the migration hook that can tie
> the MEM checkpoint and the LVM snapshot together. Can this
> migration hook ensure that there is no "time-shift" between the
> MEM and storage?

As you say, the memory and disk images must be synchronized, and you
can use the external device migration hook to do it. I posted some
demo (that is, not production!) code to do it here:

http://lists.xensource.com/archives/html/xen-devel/2006-12/msg00685.html

But I haven't looked at this problem in quite some time.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Does XEN have any hot backup/snapshot features or plan?
  2009-04-05 23:47 Does XEN have any hot backup/snapshot features or plan? zign
                   ` (2 preceding siblings ...)
  2009-04-05 23:54 ` Brendan Cully
@ 2009-04-06  1:01 ` Rogerio Ferreira
  2009-06-14  8:48 ` Omar BENHAMID
  4 siblings, 0 replies; 9+ messages in thread
From: Rogerio Ferreira @ 2009-04-06  1:01 UTC (permalink / raw)
  To: zign; +Cc: xen-devel

You can use this:

http://rogerioferreira.objectis.net/projetos/xen-backup-image

-- 
Rogerio Ferreira
Fone: +55 11 7566-1424
http://rogerioferreira.objectis.net

LPI 302 (Mixed Environment) Specialty
Senior Level Linux Professional (LPIC-3)
Advanced Level Linux Professional (LPIC-2)
Junior Level Linux Professional (LPIC-1)


2009/4/5 zign <zign@hongo.wide.ad.jp>:
> Hello everybody,
>  My name is Zign and I would like to ask a simple question.
>  For example, I want to backup my VMs everyday. But I do not
> want them to be stopped while the backup. For this reason, I can't
> use a traditional way like:  freeze the VM  -> backup everything ->
> restore the VM.
>  So is there any solution for this?
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Zhao Yue
>  Esaki Laboratory,
>  Information Physics & Communication Engineering,
>  Graduate School of Information Science and Technology,
>  The University of Tokyo
> Email: zign@hongo.wide.ad.jp
>       zign@zign.cn
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Does XEN have any hot backup/snapshot features or plan?
  2009-04-05 23:47 Does XEN have any hot backup/snapshot features or plan? zign
                   ` (3 preceding siblings ...)
  2009-04-06  1:01 ` Rogerio Ferreira
@ 2009-06-14  8:48 ` Omar BENHAMID
  2009-06-15 20:25   ` Dutch Meyer
  4 siblings, 1 reply; 9+ messages in thread
From: Omar BENHAMID @ 2009-06-14  8:48 UTC (permalink / raw)
  To: zign; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 2486 bytes --]

Hi,
I was thinking of prototyping "hot snapshotting" of blktap backed vbds.
The idea would be for example : for a domain called MyDomain having
/var/xen/data/mydisk.vmdk attached to hda

xm vbd-snapshot-create MyDomain hda /var/xen/snapshot/snapshot1.vmdk

xend will then synchronise the domain, pause it and signal blktap daemon to
create a disk snapshot : Current block device attached to hda would be
closed and moved to /var/backup/snapshot1.vmdk than recreate mydisk.vmdk as
a cow copy of snapshot1.vmdk then unpause the domain. snapshot1.vmdk could
be backed up safely as it receives no writes. After backup imagine some
thing like :

xm vbd-snapshot-merge MyDomain hda

That would "commit" mydisk.vmdk into snapshot1.vmdk, either with a paused
domain or (more complex but more confortable) live.

- How interesting this would be for general use ? Interface should of course
be generic enought to support large variety of tap storage backends (cow,
vmdk, vhd ?). Would it be interesting enought to some day get integrated in
mainstream xen ? Or philosophy of lean means that we won't implement in xen
something that LVM would do fine ?

- Is there already some work like this ?

- As of xen 3.2 (and hopefully 3.3) i think blktap daemon is the right place
to do it, adding the right callbacks to tap_disk structure and implementing
it in convinent drivers. But i saw plans with xen 3.4 (or after ?) with the
idea of deep rework trying to merge everything in qemu device model? What is
the best place to do this ?



Regards,

Omar BENHAMID


On Mon, Apr 6, 2009 at 1:47 AM, zign <zign@hongo.wide.ad.jp> wrote:

> Hello everybody,
>  My name is Zign and I would like to ask a simple question.
>  For example, I want to backup my VMs everyday. But I do not
> want them to be stopped while the backup. For this reason, I can't
> use a traditional way like:  freeze the VM  -> backup everything ->
> restore the VM.
>  So is there any solution for this?
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Zhao Yue
>  Esaki Laboratory,
>  Information Physics & Communication Engineering,
>  Graduate School of Information Science and Technology,
>  The University of Tokyo
> Email: zign@hongo.wide.ad.jp
>       zign@zign.cn
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>



-- 
Omar BENHAMID
Email: o.benhamid@bewigo.fr
Tel: +33 6 09 31 60 60
http://www.bewigo.fr

[-- Attachment #1.2: Type: text/html, Size: 3292 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Does XEN have any hot backup/snapshot features or plan?
  2009-06-14  8:48 ` Omar BENHAMID
@ 2009-06-15 20:25   ` Dutch Meyer
  0 siblings, 0 replies; 9+ messages in thread
From: Dutch Meyer @ 2009-06-15 20:25 UTC (permalink / raw)
  To: Omar BENHAMID; +Cc: zign, xen-devel

Hot snapshot capabilities are in blktap2 (in xen-unstable) for qcow and 
vhd.  However, there's no unified snapshot interface.  Each driver has its 
own interface, but you could script something up for one or more disk 
types pretty easily. Check out tools/blktap2/vhd/vhd-util.

--Dutch

On Sun, 14 Jun 2009, Omar BENHAMID wrote:

> Hi,
> I was thinking of prototyping "hot snapshotting" of blktap backed vbds.
> The idea would be for example : for a domain called MyDomain having
> /var/xen/data/mydisk.vmdk attached to hda
>
> xm vbd-snapshot-create MyDomain hda /var/xen/snapshot/snapshot1.vmdk
>
> xend will then synchronise the domain, pause it and signal blktap daemon to
> create a disk snapshot : Current block device attached to hda would be
> closed and moved to /var/backup/snapshot1.vmdk than recreate mydisk.vmdk as
> a cow copy of snapshot1.vmdk then unpause the domain. snapshot1.vmdk could
> be backed up safely as it receives no writes. After backup imagine some
> thing like :
>
> xm vbd-snapshot-merge MyDomain hda
>
> That would "commit" mydisk.vmdk into snapshot1.vmdk, either with a paused
> domain or (more complex but more confortable) live.
>
> - How interesting this would be for general use ? Interface should of course
> be generic enought to support large variety of tap storage backends (cow,
> vmdk, vhd ?). Would it be interesting enought to some day get integrated in
> mainstream xen ? Or philosophy of lean means that we won't implement in xen
> something that LVM would do fine ?
>
> - Is there already some work like this ?
>
> - As of xen 3.2 (and hopefully 3.3) i think blktap daemon is the right place
> to do it, adding the right callbacks to tap_disk structure and implementing
> it in convinent drivers. But i saw plans with xen 3.4 (or after ?) with the
> idea of deep rework trying to merge everything in qemu device model? What is
> the best place to do this ?
>
>
>
> Regards,
>
> Omar BENHAMID
>
>
> On Mon, Apr 6, 2009 at 1:47 AM, zign <zign@hongo.wide.ad.jp> wrote:
>
>> Hello everybody,
>>  My name is Zign and I would like to ask a simple question.
>>  For example, I want to backup my VMs everyday. But I do not
>> want them to be stopped while the backup. For this reason, I can't
>> use a traditional way like:  freeze the VM  -> backup everything ->
>> restore the VM.
>>  So is there any solution for this?
>>
>> --
>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>> Zhao Yue
>>  Esaki Laboratory,
>>  Information Physics & Communication Engineering,
>>  Graduate School of Information Science and Technology,
>>  The University of Tokyo
>> Email: zign@hongo.wide.ad.jp
>>       zign@zign.cn
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>>
>
>
>
> --
> Omar BENHAMID
> Email: o.benhamid@bewigo.fr
> Tel: +33 6 09 31 60 60
> http://www.bewigo.fr
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-06-15 20:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-05 23:47 Does XEN have any hot backup/snapshot features or plan? zign
2009-04-05 23:53 ` Thiago Camargo Martins Cordeiro
2009-04-05 23:54 ` Patrick Colp
2009-04-05 23:54 ` Brendan Cully
2009-04-06  0:16   ` zign
2009-04-06  0:24     ` Brendan Cully
2009-04-06  1:01 ` Rogerio Ferreira
2009-06-14  8:48 ` Omar BENHAMID
2009-06-15 20:25   ` Dutch Meyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.