--_002_D1C34669125B0soerenmalchowmconnet_
Content-Type: text/plain; charset="us-ascii"
Content-ID: <E0039E08D5007A4CBA3324A58133634A(a)liquidcampaign.com>
Content-Transfer-Encoding: quoted-printable
Dear Chris,
It is not true, you can snapshot a machine, then clone the snapshot and
export it for backup purposes after that you can remove the snapshot, all
on the live VM.
However, you need newer versions of libvirt to do that, right now we are
using CentOS 7.1 and the libvirt that comes with it is capable of doing
live merge which is necessary to achieve this.
But i have to warn you, we are experiencing a problem when removing the
snapshots (the part is commented in the attached script) it sometimes
kills virtual machines in a way that makes it necessary to put the
hypervisor to maintenance and then restart vdsmd and libvirtd before you
can start that VM again.
There is a bug filed already and it is in progress
https://bugzilla.redhat.com/show_bug.cgi?id=3D1231754
I also have to add that i newer version of libvirt (on Fedora 20 with the
libvirt preview repo) did not have that problem, so i am confident that
this will be solved soon.
Last but not least there is a plan to be able to export snapshots right
away for backup without having to clone them first, this is a huge step
forward for the backup procedure in terms of time that is needed and the
load on the storage and hypervisor systems.
I would really appreciate if you would help improving that script (we are
not python developers), i will see that i make this a github project or
something like that
Cheers
Soeren
On 08/07/15 17:13, "users-bounces(a)ovirt.org on behalf of Chris Jones -
BookIt.com Systems Administrator" <users-bounces(a)ovirt.org on behalf of
chris.jones(a)bookit.com> wrote:
From what I can tell, you can only backup a VM to an export domain
if
the VM is shut down. Is a live VM backup not possible through oVirt? If
not, why not? Most other virtualization tools can handle this.
If it is possible, how do I do it through the backup API?
api.vms.myvm.export requires it to be shutdown so what would the
alternative be?
Thanks.
--=20
This email was Virus checked by UTM 9. For issues please contact the
Windows Systems Admin.
_______________________________________________
Users mailing list
Users(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/users
--_002_D1C34669125B0soerenmalchowmconnet_
Content-Type: text/x-python-script; name="backup-queue.py"
Content-Description: backup-queue.py
Content-Disposition: attachment; filename="backup-queue.py"; size=5397;
creation-date="Wed, 08 Jul 2015 19:36:33 GMT";
modification-date="Wed, 08 Jul 2015 19:36:33 GMT"
Content-ID: <7F8DD58C5E6E5C4CB5C4696512014B13(a)liquidcampaign.com>
Content-Transfer-Encoding: base64
IyEvdXNyL2Jpbi9weXRob24KCmltcG9ydCBRdWV1ZQppbXBvcnQgdGhyZWFkaW5nCmltcG9ydCB0
aW1lCmZyb20gb3ZpcnRzZGsuYXBpIGltcG9ydCBBUEkKZnJvbSBvdmlydHNkay54bWwgaW1wb3J0
IHBhcmFtcwppbXBvcnQgc3lzCmltcG9ydCBkYXRldGltZQppbXBvcnQgc210cGxpYgpmcm9tIGVt
YWlsLm1pbWUudGV4dCBpbXBvcnQgTUlNRVRleHQKCgpnbG9iYWwgU05BUFNIT1RfTkFNRQoKVkVS
U0lPTiAgICAgICAgICAgICA9IHBhcmFtcy5WZXJzaW9uKG1ham9yPSczJywgbWlub3I9JzAnKQpF
TkdJTkVfU0VSVkVSICAgICAgID0gJycKRU5HSU5FX1VTRVIgICAgICAgICA9ICcnCkVOR0lORV9Q
QVNTV09SRCAgICAgPSAnJwpFTkdJTkVfQ0VSVCAgICAgICAgID0gJycKTk9XICAgICAgICAgICAg
ICAgICA9IGRhdGV0aW1lLmRhdGV0aW1lLm5vdygpClNOQVBTSE9UX05BTUUgICAgICAgPSAnQkFD
S1VQXycgKyBOT1cuc3RyZnRpbWUoIiVZLSVtLSVkLSVIJU0iKQpEQVlfT0ZfV0VFSyAgICAgICAg
ID0gTk9XLnN0cmZ0aW1lKCIldyIpCkJBQ0tVUCAgICAgICAgICAgICAgPSAiRlVMTCIKCmV4aXRG
bGFnID0gMAoKY2xhc3MgbXlUaHJlYWQgKHRocmVhZGluZy5UaHJlYWQpOgogICAgZGVmIF9faW5p
dF9fKHNlbGYsIHRocmVhZElELCBuYW1lLCBxKToKICAgICAgICB0aHJlYWRpbmcuVGhyZWFkLl9f
aW5pdF9fKHNlbGYpCiAgICAgICAgc2VsZi50aHJlYWRJRCA9IHRocmVhZElECiAgICAgICAgc2Vs
Zi5uYW1lID0gbmFtZQogICAgICAgIHNlbGYuc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
ICAgICAgICBpZiBub3QgZXhwb3J0OgogICAgICAgICAgICAgICAgcHJpbnQoIkV4cG9ydCBkb21h
aW4gcmVxdWlyZWQsIGFuZCBub25lIGZvdW5kLCBleGl0dGluZy4uLlxuIikKICAgICAgICAgICAg
ICAgIHN5cy5leGl0KDEpCiAgICAgICAgICAgIGlmIChkYXRhLm5hbWUgIT0gJ0hvc3RlZEVuZ2lu
ZScgYW5kIGNsdXN0ZXIubmFtZSA9PSAnQ0MtMDEnKToKICAgICAgICAgICAgICAgIHZtLnNuYXBz
aG90cy5hZGQocGFyYW1zLlNuYXBzaG90KGRlc2NyaXB0aW9uPVNOQVBTSE9UX05BTUUsIHZtPXZt
ICkpCiAgICAgICAgICAgICAgICBzbmFwID0gdm0uc25hcHNob3RzLmxpc3QoZGVzY3JpcHRpb249
U05BUFNIT1RfTkFNRSlbMF0KICAgICAgICAgICAgICAgIHdoaWxlIHZtLnNuYXBzaG90cy5nZXQo
aWQ9c25hcC5pZCkuc25hcHNob3Rfc3RhdHVzID09ICJsb2NrZWQiOgogICAgICAgICAgICAgICAg
ICAgIHByaW50KCIlcyBXYWl0aW5nIGZvciBzbmFwc2hvdCBvZiAlcyB0byBmaW5pc2giKSAlICh0
aHJlYWROYW1lLCB2bS5uYW1lKQogICAgICAgICAgICAgICAgICAgIHRpbWUuc2xlZXAoNjApCiAg
ICAgICAgICAgICAgICBwcmludCgiJXMgU25hcHNob3R0aW5nICVzIGlzIGRvbmUiKSAlICh0aHJl
YWROYW1lLHZtLm5hbWUpCiAgICAgICAgICAgICAgICB0cnk6CiAgICAgICAgICAgICAgICAgICAg
c25hcHNob3RzID0gcGFyYW1zLlNuYXBzaG90cyhzbmFwc2hvdD1bcGFyYW1zLlNuYXBzaG90KGlk
PXNuYXAuaWQpXSkKICAgICAgICAgICAgICAgICAgICBhcGkudm1zLmFkZChwYXJhbXMuVk0obmFt
ZT1uZXd2bW5hbWUsIHNuYXBzaG90cz1zbmFwc2hvdHMsIGNsdXN0Z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9ja2VkIjoKIyAgICAgICAgICAgICAgICAg
ICAgICAgIHByaW50KCJXYWl0aW5nIGZvciBzbmFwc2hvdCAlcyBvbiAlcyBkZWxldGlvbiB0byBm
aW5pc2giKSAlIChzbmFwc2hvdC5kZXNjcmlwdGlvbiwgdm0ubmFtZSkKIyAgICAgICAgICAgICAg
ICAgICAgICAgIHRpbWUuc2xlZXAoMzAwKQojICAgICAgICAgICAgICAgIGV4Y2VwdCBFeGNlcHRp
b24gYXMgZToKIyAgICAgICAgICAgICAgICAgICAgcHJpbnQgKCJTbmFwc2hvdCAlcyBkb2VzIG5v
dCBleGlzdCBhbnltb3JlIikgJSBzbmFwc2hvdC5kZXNjcmlwdGlvbgojICAgICAgICBwcmludCAo
IlNuYXBzaG90IGRlbGV0aW9uIGZvciAlcyBkb25lIikgJSB2bS5uYW1lCiMgICAgcHJpbnQgKCJE
ZWxldGlvbiBvZiBzbmFwc2hvdHMgZG9uZSIpIAojICAgIGFwaS5kaXNjb25uZWN0KCkKI2V4Y2Vw
dCBFeGNlcHRpb24gYXMgZToKIyAgICBwcmludCAoIlNvbWV0aGluZyB3ZW50IHdyb25nIHdoZW4g
ZGVsZXRpbmcgdGhlIHNuYXBzaG90c1xuJXMiKSAlIHN0cihlKQoK
--_002_D1C34669125B0soerenmalchowmconnet_--