From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aG9Kg-0006tq-4E for qemu-devel@nongnu.org; Mon, 04 Jan 2016 12:54:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aG9Kc-0003qT-Sv for qemu-devel@nongnu.org; Mon, 04 Jan 2016 12:54:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aG9Kc-0003qB-Mn for qemu-devel@nongnu.org; Mon, 04 Jan 2016 12:54:10 -0500 References: <568AAFC4.6060009@redhat.com> From: Eric Blake Message-ID: <568AB1BD.6040103@redhat.com> Date: Mon, 4 Jan 2016 10:54:05 -0700 MIME-Version: 1.0 In-Reply-To: <568AAFC4.6060009@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cpHUwi8MUleI8RJw4j1GmTV3NTwaxwvoj" 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: Max Reitz , Huan Zhang , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --cpHUwi8MUleI8RJw4j1GmTV3NTwaxwvoj Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 environmen= t, >> But we can't ensure the below way will work well, and user data are sa= fe. >> >> 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 >=20 > What do you mean by "rollback"? Just getting back to the state presente= d > in snap1, discarding all the changes done in snap2 and active? >=20 > 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: >=20 > $ qemu-img create -f qcow2 -b snap1.qcow2 active.qcow2 Don't forget to also set the backing format (either '-o backing_fmt=3Dqcow2' or the undocumented '-F qcow2'). Without an explici= t format, libvirt will default to refusing to honor your backing files rather than risk an unsafe format probe. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --cpHUwi8MUleI8RJw4j1GmTV3NTwaxwvoj 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWirG9AAoJEKeha0olJ0NqeDYH/j8tchrx0a/x8eeZtpea2mb/ loHfmqi43kzCbwRCSIhGP2sDJWWEw0SVm1TqggLtc3MC1O2+2rNdBwJDxFJSYQed R8j9C/doWIrCPYIHj5ZXembvQElXL9UYW/BSAe5iMkov953/OttcsqpE64ClCKJ2 7hqrczmwySEF+iI4Bq7YUYQOS0FlcJmdn4X85DLI1aCnBkf4pxzDMCDEmAvu4Eru HfxuBbR1KoTsr5oq2uTJAaMX0n8gfBTsj1l6ypqS353CcdwKpJl4qUnaqSbruytw fcb4OsZn62+mcxLV9RGv7cdbzkCpwFVIq6vB7a7jY8jF1JQgoOwnuq3ZacwGK9g= =yXzK -----END PGP SIGNATURE----- --cpHUwi8MUleI8RJw4j1GmTV3NTwaxwvoj--