[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/5] add backup related monitor commands
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 4/5] add backup related monitor commands |
Date: |
Wed, 21 Nov 2012 09:16:24 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121029 Thunderbird/16.0.2 |
On 11/21/2012 02:01 AM, Dietmar Maurer wrote:
> We currently create 'vma' archives without any configuration inside.
> Future versions may support other formats...
>
> Another option would be to simply dump <devid,cluster_num,cluster_data> to
> the output fh (pipe), and an external binary saves the data. That way we
> could move the whole archive format related code out of qemu.
>
> +++ b/qapi-schema.json
> @@ -357,6 +357,13 @@
> ##
> { 'type': 'EventInfo', 'data': {'name': 'str'} }
>
> +
> +{ 'type': 'BackupStatus',
> + 'data': {'*status': 'str', '*errmsg': 'str', '*total': 'int',
> + '*transferred': 'int', '*zero-bytes': 'int',
> + '*start-time': 'int', '*end-time': 'int',
> + '*backupfile': 'str', '*uuid': 'str' } }
> +
Missing documentation for what all these fields mean.
> ##
> # @query-events:
> #
> @@ -1764,6 +1771,45 @@
> 'data': { 'path': 'str' },
> 'returns': [ 'ObjectPropertyInfo' ] }
>
> +
> +##
> +# @backup:
> +#
> +# Starts a VM backup.
> +#
> +# @backupfile: the backup file name
> +#
> +# @speed: #optional the maximum speed, in bytes per second
> +#
> +# Returns: the uuid of the backup job
> +#
Needs to mention when it was introduced (at best, it will be since 1.4).
> +##
> +{ 'command': 'backup', 'data': { 'backupfile': 'str', '*devlist': 'str',
> + '*speed': 'int' },
> + 'returns': 'str' }
> +
> +##
> +# @query-backup
> +#
> +# Returns information about current/last backup task.
> +#
> +# Returns: @BackupStatus
> +#
> +##
> +{ 'command': 'query-backup', 'returns': 'BackupStatus' }
> +
> +##
> +# @backup_cancel
s/_/-/, you should prefer dashes in QMP
> +#
> +# Cancel the current executing backup process.
> +#
> +# Returns: nothing on success
> +#
> +# Notes: This command succeeds even if there is no backup process running.
> +#
> +##
> +{ 'command': 'backup_cancel' }
> +
You are basically adding a new asynchronous job. Do you really need to
add a 'backup-cancel' command, or should we be reusing a generic
framework for canceling arbitrary jobs?
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature