From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>,
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 10:54:05 -0700 [thread overview]
Message-ID: <568AB1BD.6040103@redhat.com> (raw)
In-Reply-To: <568AAFC4.6060009@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1263 bytes --]
On 01/04/2016 10:45 AM, Max Reitz wrote:
> 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
Don't forget to also set the backing format (either '-o
backing_fmt=qcow2' or the undocumented '-F qcow2'). Without an explicit
format, libvirt will default to refusing to honor your backing files
rather than risk an unsafe format probe.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-01-04 17:54 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
2016-01-04 17:54 ` Eric Blake [this message]
[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=568AB1BD.6040103@redhat.com \
--to=eblake@redhat.com \
--cc=huan.zhang.jn@gmail.com \
--cc=mreitz@redhat.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 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.