xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Bamvor Jian Zhang <bjzhang@suse.com>
To: xen-devel@lists.xen.org
Cc: zzhou@suse.com, ian.campbell@citrix.com, hahn@univention.de,
	ian.jackson@eu.citrix.com, cyliu@suse.com, jfehlig@suse.com,
	bjzhang@suse.com, anthony.perard@citrix.com,
	davidkiarie4@gmail.com
Subject: [RFC V5 1/5] docs: libxl Domain Snapshot HOWTO
Date: Mon,  7 Jul 2014 15:46:00 +0800	[thread overview]
Message-ID: <1404719164-4983-2-git-send-email-bjzhang@suse.com> (raw)
In-Reply-To: <1404719164-4983-1-git-send-email-bjzhang@suse.com>

libxl Domain Snapshot HOWTO
--------

Author:
   Bamvor Jian Zhang <bjzhang@suse.com>

* Overview:
    Two levels of snapshot: disk snapshot and domain snapshot
    Four types of snapshot operations: create, delete, list and revert.

    * Disk snapshot
        Disk snapshot is crash-consistent if the domain is running. It could be
        "internal" (like in qcow2 format, snapshot and delta are both in one
        image file), or "external" (snapshot in one file, delta in another).

    * Domain snapshot
        Domain snapshot includes disk snapshots and domain state saving. domain
        could be resumed to the very state when the snapshot was created. This
        kind of snapshot is also referred to as a domain checkpoint or system
        checkpoint.

        "domain snapshot create" means saving domain state and doing disk
        snapshots. In the beginning of creating domain snapshot, it will check
        whether it is snapshotable.

        "domain snapshot revert" means rolling back to the state of indicated
        snapshot.

* Operations of Snapshot

    * Create Snapshot:

        User could create internal or external snapshot with or without config
        file. Refer to xl.snapshot.5 ( RFC Doc 5/5) for details of the config
        file. The Config file could provide all the features of snapshot, e.g.
        User could determine which disk will be included in snapshot(one or all
        disks).

        Use Cases:

        1), create an internal snapshot with default name (autogenerated name:
            epoch second from 1, Jan 1970). Internal snapshot is only supported
            by qcow2 format.
            e.g.:
                #xl snapshot-create your_domain

        2), create an internal snapshot with specific snapshot name.
            e.g.:
                #xl snapshot-create -n domain_snapshot_name your_domain

        3), create an external snapshot
            To create an external snapshot, you must specify a config file, in
            which you could specify the external path and the snapshot type in
            'disk'.
            e.g.:
                #xl snapshot-create your_domain config_file

            #cat snapshot_external_config_file
            name = "1397207577"
            description="Snapshot after OS installation. External snapshot"
            memory="yes"
            disk=['hda=/var/lib/xen/snapshots/<domain_uuid>/disk_hda.qcow2,type=qcow2',
                  'hdc=/var/lib/xen/snapshots/<domain_uuid>/disk_hdc.qcow2,type=qcow2']

        4), create disk-only snapshot, which means no memory state will be saved
            in this snapshot. Could be internal and external.
            e.g.:
                (internal)
                #xl snapshot-create --disk-only your_domain

                (external)
                #xl snapshot-create your_domain disk_only_config_file

            specific config file (to indicate which disks to be snapshotted).
            #cat disk_only_config_file
            name = "1397207577"
            description="Snapshot after OS installation. External disk-only\
                         snapsot. Only care about the root file system"
            disk=['hda=/var/lib/xen/snapshots/<domain_uuid>/disk_hda.qcow2,type=qcow2']

    * List Snapshot:

        Use Cases:

        1), List short information of all snapshots for the specific domain.
            Short information include snapshot name, creation time, the domain
            state when create snapshot, whether it is a disk-only snapshot.

            e.g.:
                #xl snapshot-list your_domain

        2), List full information of one snapshot for specific domain.
            Full information include short information and all the disk snapshot
            relative to that domain snapshot.
            e.g.:
                #xl snapshot-list -l -n domain_snapshot_name your_domain

        3), list full information of all snapshots for specific domain.
            e.g.:
                #xl snapshot-list -l your_domain

    * Delete snapshot:

        Use Cases:

        1), delete a snapshot for specific domain.
            This operation will delete all relative to this snapshot
            e.g.:
               #xl snapshot-delete -n domain_snapshot_name your_domain

    * Revert snapshot:

        Use Cases:

        Curently, only internal snapshot revert is supportted.
        Following command will revert an internal disk snapshot and memory state.
        e.g.:
            #xl snapshot-revert -n domain_snapshot_name your_domain

  reply	other threads:[~2014-07-07  7:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-07  7:45 [RFC V5 0/5] domain snapshot document and discussion Bamvor Jian Zhang
2014-07-07  7:46 ` Bamvor Jian Zhang [this message]
2014-07-07  7:46 ` [RFC V5 2/5] Libxl Domain Snapshot API Design Bamvor Jian Zhang
2014-07-11 12:47   ` Ian Campbell
2014-07-11 13:19     ` Ian Jackson
2014-07-11 15:43       ` Bamvor Jian Zhang
2014-07-14 14:42     ` Bamvor Jian Zhang
2014-07-14 15:18       ` Ian Campbell
2014-07-16  9:27         ` Bamvor Jian Zhang
2014-07-16  9:50           ` Ian Campbell
2014-07-17  8:02             ` Bamvor Jian Zhang
2014-07-07  7:46 ` [RFC V5 3/5] docs: manpage for xl snapshot command Bamvor Jian Zhang
2014-07-07  7:46 ` [RFC V5 4/5] xl snapshot-xxx implementation details Bamvor Jian Zhang
2014-07-07  7:46 ` [RFC V5 5/5] docs: man page for xl.snapshot.cfg Bamvor Jian Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1404719164-4983-2-git-send-email-bjzhang@suse.com \
    --to=bjzhang@suse.com \
    --cc=anthony.perard@citrix.com \
    --cc=cyliu@suse.com \
    --cc=davidkiarie4@gmail.com \
    --cc=hahn@univention.de \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jfehlig@suse.com \
    --cc=xen-devel@lists.xen.org \
    --cc=zzhou@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).