-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backups: option to reuse the current VM (in-place restore) #6053
Comments
We have been disusing this internally and, what we call "in-place" restore is something we want to tackle, We'll keep this issue to address this feature. However, I don't agree that the current restore procedure is cumbersome and requires knowledge. First you are assuming that the VM still lives and even that you want to restore the VM in the same host/cluster. In general this is not true, if you want to restore a previous point for a running VM a disk or system snapshost is much better option than a backup. Backup and snapshotting are different things but both have their use cases, you should not be using one for the other. The restore procedure needs to select (and we are in the process of giving more options) what you want to preserve (this is a common practice in other backup solutions like Veeam etc...) So, to some extent the user needs to decide what needs to be restored. We can give more options like ( |
Even more important as incremental backups impose important limitations for snapshots. |
This commit implements the in-place restore of VM backups. Selected VM disks will be replaced with the specified backup: * A new API call has been added to the XML-RPC API (`one.vm.restore`) with the following arguments: - VM ID to be restored, needs to be in **poweroff** state - IMAGE ID of the backup to restore - INCREMENT ID, only for incremental backups, the increment to use (defults to -1 to use the last increment available) - DISK ID of the disk to restore (defaults to -1 to restore all VM disks) * Datastore drivers needs to implemente a new operation `ls`. This new operation takes the VM, image information of the backup and datastore information and returns the restore URL for the disks in the backup. * This commit includes the implementation for qcow2 and ssh drivers, ceph will be implemented in a separated PR. The new driver action is `restore host:vm_dir vm_id img_id inc_id disk_id` * The restore operation is performed in a new state `PROLOG_RESTORE` rendered as `RESTORE` and `rest` in short form. State in in RSuntone. TODO: - Remove any existing VM snapshot (system/disk) in the VM. Note that snapshots are not included in a backup. - Ceph drivers - JAVA, GO Lang API bindings - Sunstone interface, new state and new operation. Review new state in RSuntone. co-authored-by: Pavel Czerny <pczerny@opennebula.io>
Includes documentation for: - XML-RPC api call one.vm.restore. - in-place backup operation - ls operation for datastore driver - restore operation for tm driver - what's new entry
Now it is consistent with the API naming
- Access methods to BRIDGE_LIST - Generic execution of datastore driver operations - Adapt restore operations to new interface - Adapt rsync action
Needs tests + docs |
Description
The current workflow for restoring from a backup is as follows (as far as I can understand it, please correct me if I am wrong):
So, as you see there are a lot of steps and a lot of internal knowledge needed by the user to complete a single restore task. This is experience that is not needed with any other Cloud Management platform. So I don't belive it is usable on practice...
Use case
The common use case the backup needed for recovery is very close to the current state of the VM. So this proposal to use the existing metadata in OpenNebula and only replace the disks. All of the other metadata could be altered on the current VM too - if needed. That way. I believe, much less data need to be processed/replaced/altered that when defining a new VM.
For the end user perspective - it copuld have the VM up and running from the backup after a single click. Well, definitely with a confirmation dialog. Also, it will ease the stress on the billing department too ;)
Interface Changes
Option to restore a VM using the runnig VM metadata instead of defining a new instance. Also option to select what to be the default behaviour.
Driver changes - To terminate the VM, replace the disks on the KVM host, optionally (if preferred by the user) alter the contextualization and the networking, then resume the VM.
Sunstone
Additional Context
Having a VM in complete previous state maybe have its use case, but IMHO it is not to broad one. Because usually the VM is linked with some kind of billing, in that billing there various aspects of the service could be accounted/billed, etc.
Progress Status
The text was updated successfully, but these errors were encountered: