From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXzHI-0005BD-OM for qemu-devel@nongnu.org; Mon, 22 Feb 2016 17:48:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXzHH-0006dW-Nk for qemu-devel@nongnu.org; Mon, 22 Feb 2016 17:48:28 -0500 References: <56BA88E7.7010104@redhat.com> <20160214080232.GE31933@ad.usersys.redhat.com> From: John Snow Message-ID: <56CB9034.5050402@redhat.com> Date: Mon, 22 Feb 2016 17:48:20 -0500 MIME-Version: 1.0 In-Reply-To: <20160214080232.GE31933@ad.usersys.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] RFC: incremental backups: qmp-block-dirty-bitmap-diff List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: "Denis V. Lunev" , Vladimir Sementsov-Ogievskiy , Stefan Hajnoczi , qemu-devel , Qemu-block On 02/14/2016 03:02 AM, Fam Zheng wrote: > On Tue, 02/09 19:48, John Snow wrote: >> - Reading an entire drive to populate a bitmap with the understanding >> that an incremental backup is soon to follow is inefficient if the drive >> is more than just a little dirty: it may have been quicker to just >> create a new full backup and bitmap. > > Above all I think this is a good idea. Just as an alternative, can we add > another sync mode for drive-backup? > > (QMP) drive-backup device=d0 target=target.qcow2 format=qcow2 sync=diff \ > base=full-backup.qcow2 > > (the data of d0 will be compared against full-backup.qcow2 and only different > clusters will be copied to target.qcow2) > > Fam > I like this idea too, since it has the chance to do a lot of things for us all at once. If we allow a user to pass a bitmap that we can synchronize to this backup, it will be one command that can do a few things all at once. Using the "bitmap-diff" approach [re-]establishes a bitmap, but still requires you to make the next backup. sync=diff just combines the two logical steps into one. There are two phases here: [Perform the diff] [Create a backup from that diff] backup mode=diff as suggested above performs both, block-dirty-bitmap-diff as suggested previously performs just the first action, while we already have commands to perform the second. I think arguably we'd only /need/ the bitmap-diff command, but I wouldn't personally mind having both for flexibility reasons (which historically don't fly too far on the qemu mailing list...) I think I will move ahead with prototyping the QMP command and see how far I get. If it's not too bad I'll send some code out for further debate. --js