From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aG9CY-0004Z5-EP for qemu-devel@nongnu.org; Mon, 04 Jan 2016 12:45:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aG9CT-0002Iy-En for qemu-devel@nongnu.org; Mon, 04 Jan 2016 12:45:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50519) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aG9CT-0002Is-8i for qemu-devel@nongnu.org; Mon, 04 Jan 2016 12:45:45 -0500 References: From: Max Reitz Message-ID: <568AAFC4.6060009@redhat.com> Date: Mon, 4 Jan 2016 18:45:40 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jfHVjLa8tti1sv1FkTVGOLRflNaBGLRnA" Subject: Re: [Qemu-devel] could i using qemu-img covert && rebase -u to do qcow2 rollback? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Huan Zhang , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jfHVjLa8tti1sv1FkTVGOLRflNaBGLRnA Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 saf= e. >=20 > for example, > snap0.qcow2 -> snap1.qcow2 ->snap2.qcow2 -> active.qcow2 >=20 > 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 --jfHVjLa8tti1sv1FkTVGOLRflNaBGLRnA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWiq/EAAoJEDuxQgLoOKyt3mMH/iEyvUKfaH9JzUY+7D68gzwH mAdOjy4n692d/aqRj+bKn0VyV6Q2t+zpwkuWwCAIQcn0nU8V7OuKpOv0cfrjM2Je FF1B7dhudRThEMR1Y4BlMg+/rMbveSyMUKkwEbbQiApIBMak/ON21fOa9EnZASry SGPmhm7VQBTUlaorioph3IBWBvTES7jwfBEUjXcGnW++Gv4Z7m+ufLCXXCmFFERa 2IDMzDptm0POSCEb63YuW8cxwYf3/55BrBQnX9GT3qt++lX6aR2JPSWY7JfsPWEa zYTSsMLQAAqC9n9oa8FXLULYCpjNw7JEyCTcCK1Z5AiRlALs3A6K+VAFL1EF6MM= =BGm3 -----END PGP SIGNATURE----- --jfHVjLa8tti1sv1FkTVGOLRflNaBGLRnA--