[PATCH v2 RFC 00/12] introduce push backups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Diff from v1 [3]

 - add man/html docs
 - add backup xml schema

Push backup is a backup when hypervisor itself copy backup data to destination
in contrast to pull backup when hypervisor exports backup data thru some
interface and mgmt itself make a copy.

This patch series basically adds creating backup to API/remote/qemu/virsh and
initial backup XML definition.

Just like other blockjobs backup creation is asynchronous. That is creation is
merely a backup start and client should track backup error/completion thru
blockjob events. As backup is done transactionally all individual disk backup
jobs will be aborted by qemu itself in case of error, client need not to do it
manually. Client can cancel the backup by aborting blockjob on any disk being
backed up.

Backup xml desription is similar to snapshot one with some exceptions and is
described in more details in definition patch [p1] or in html docs.

I guess good client will track progress for every disk in backup to report
progress and detect hangs so it don't need extra backup complete/error event
that aggregate the overall backup result. However it looks like aborting backup
can be implemented in libvirt as code will be common for all clients. We need
to abort some of not yet completed per disk backups and retry if job to be
aborted is completed meanwhile.

Of coures this series is far from being complete. Incremental backups and
backup persistent metadata is to be implemented. Let's just start work in this
direction.

Links:

In [1] we came to agreement to create distinct API to support backup operations
and there is a discussion of pull backup series in [2]. The latter is blocked
as some necessary operations are still experimental in qemu. [3] is the 
first version of series.

[1] https://www.redhat.com/archives/libvir-list/2016-March/msg00937.html
[2] https://www.redhat.com/archives/libvir-list/2016-September/msg00192.html
[3] https://www.redhat.com/archives/libvir-list/2017-May/msg00130.html

Nikolay Shirokovskiy (12):
  api: backup: add api to create backup
  api: backup: add driver based implementation
  remote: backup: add create backup implementation
  backup: qemu: monitor: add drive-backup command
  backup: misc: add backup block job type
  conf: backup: add backup xml definition                          [p1]
  qemu: backup: add qemuDomainBackupCreateXML implementation
  qemu: backup: check backup destination before start
  qemu: backup: prepare backup destination
  virsh: backup: add backup-create command
  schema: backup: add schema and its tests
  docs: add backup html docs

 daemon/remote.c                                |   8 +
 docs/Makefile.am                               |   3 +
 docs/apibuild.py                               |   2 +
 docs/docs.html.in                              |   4 +-
 docs/format.html.in                            |   1 +
 docs/formatbackup.html.in                      |  58 +++++
 docs/index.html.in                             |   3 +-
 docs/schemas/domainbackup.rng                  |  79 +++++++
 examples/object-events/event-test.c            |   3 +
 include/libvirt/libvirt-domain-backup.h        |  59 +++++
 include/libvirt/libvirt-domain.h               |   3 +
 include/libvirt/libvirt.h                      |   1 +
 include/libvirt/virterror.h                    |   2 +
 po/POTFILES.in                                 |   2 +
 src/Makefile.am                                |   3 +
 src/access/viraccessperm.c                     |   3 +-
 src/access/viraccessperm.h                     |   6 +
 src/conf/backup_conf.c                         | 299 +++++++++++++++++++++++++
 src/conf/backup_conf.h                         |  70 ++++++
 src/conf/domain_conf.c                         |   2 +-
 src/datatypes.c                                |  60 +++++
 src/datatypes.h                                |  29 +++
 src/driver-hypervisor.h                        |   5 +
 src/libvirt-domain-backup.c                    | 209 +++++++++++++++++
 src/libvirt_private.syms                       |   9 +
 src/libvirt_public.syms                        |  10 +
 src/qemu/qemu_conf.h                           |   1 +
 src/qemu/qemu_driver.c                         | 239 +++++++++++++++++++-
 src/qemu/qemu_monitor.c                        |  14 ++
 src/qemu/qemu_monitor.h                        |   5 +
 src/qemu/qemu_monitor_json.c                   |  36 +++
 src/qemu/qemu_monitor_json.h                   |   5 +
 src/remote/remote_driver.c                     |   7 +
 src/remote/remote_protocol.x                   |  23 +-
 src/rpc/gendispatch.pl                         |  29 ++-
 src/util/virerror.c                            |   6 +
 tests/domainbackupxml/block_target.xml         |   5 +
 tests/domainbackupxml/explicit_description.xml |   6 +
 tests/domainbackupxml/explicit_file_type.xml   |   5 +
 tests/domainbackupxml/explicit_format.xml      |   5 +
 tests/domainbackupxml/explicit_name.xml        |   6 +
 tests/domainbackupxml/multi_disk.xml           |   8 +
 tests/domainbackupxml/ref_by_path.xml          |   5 +
 tests/virschematest.c                          |   1 +
 tools/Makefile.am                              |   1 +
 tools/virsh-backup.c                           | 100 +++++++++
 tools/virsh-backup.h                           |  29 +++
 tools/virsh-domain.c                           |   3 +-
 tools/virsh-util.c                             |  11 +
 tools/virsh-util.h                             |   3 +
 tools/virsh.c                                  |   2 +
 tools/virsh.h                                  |   1 +
 tools/virsh.pod                                |  20 ++
 tools/virt-xml-validate.in                     |   5 +-
 54 files changed, 1499 insertions(+), 15 deletions(-)
 create mode 100644 docs/formatbackup.html.in
 create mode 100644 docs/schemas/domainbackup.rng
 create mode 100644 include/libvirt/libvirt-domain-backup.h
 create mode 100644 src/conf/backup_conf.c
 create mode 100644 src/conf/backup_conf.h
 create mode 100644 src/libvirt-domain-backup.c
 create mode 100644 tests/domainbackupxml/block_target.xml
 create mode 100644 tests/domainbackupxml/explicit_description.xml
 create mode 100644 tests/domainbackupxml/explicit_file_type.xml
 create mode 100644 tests/domainbackupxml/explicit_format.xml
 create mode 100644 tests/domainbackupxml/explicit_name.xml
 create mode 100644 tests/domainbackupxml/multi_disk.xml
 create mode 100644 tests/domainbackupxml/ref_by_path.xml
 create mode 100644 tools/virsh-backup.c
 create mode 100644 tools/virsh-backup.h

-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux