From: Max Reitz <mreitz@redhat.com>
To: Huan Zhang <huan.zhang.jn@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] could i using qemu-img covert && rebase -u to do qcow2 rollback?
Date: Mon, 4 Jan 2016 18:45:40 +0100 [thread overview]
Message-ID: <568AAFC4.6060009@redhat.com> (raw)
In-Reply-To: <CAFU9Con42dfvjucMWduRvUXMjrS-_aDTV43_ofMhHSFbEZ6b_Q@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]
On 30.12.2015 12:31, Huan Zhang wrote:
> Hi,
> We are finding a way to do rollback for qcow2 in production environment,
> But we can't ensure the below way will work well, and user data are safe.
>
> for example,
> snap0.qcow2 -> snap1.qcow2 ->snap2.qcow2 -> active.qcow2
>
> rollback to snap1 using convert && rebase -u:
> 1. qemu-img convert -O qcow2 snap1.qcow2 rollback.qcow2
> 2. qemu-img rebase -u -b snap2.qcow2 rollback.qcow2
What do you mean by "rollback"? Just getting back to the state presented
in snap1, discarding all the changes done in snap2 and active?
Then why don't you just throw snap2.qcow2 and active.qcow2 away and
continue to work on snap1.qcow2? If you want to keep snap1 in its
current state, just create a new image on top of it:
$ qemu-img create -f qcow2 -b snap1.qcow2 active.qcow2
Anyway, the qemu-img rebase line looks fishy to me. What you are doing
is using snap2.qcow2 as a backing file of snap1.qcow2, basically, and
this is just the wrong way around than it was before.
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-01-04 17:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-30 11:31 [Qemu-devel] could i using qemu-img covert && rebase -u to do qcow2 rollback? Huan Zhang
2015-12-31 1:12 ` Huan Zhang
2016-01-04 17:45 ` Max Reitz [this message]
2016-01-04 17:54 ` Eric Blake
[not found] ` <CAFU9Conh77-Xgib5MAFnmFE7OVt19A=KgB0=Da=Rk47B-9Bcrw@mail.gmail.com>
2016-01-06 15:39 ` Max Reitz
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=568AAFC4.6060009@redhat.com \
--to=mreitz@redhat.com \
--cc=huan.zhang.jn@gmail.com \
--cc=qemu-devel@nongnu.org \
/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).