1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/oadp-restore-single-vm.adoc
Shruti Deshpande 8997ab35dc fix broken link
Signed-off-by: Shruti Deshpande <shdeshpa@redhat.com>
2025-12-08 11:32:20 +00:00

49 lines
1.7 KiB
Plaintext

// Module included in the following assemblies:
//
// * backup_and_restore/application_backup_and_restore/installing/installing-oadp-kubevirt.adoc
:_mod-docs-content-type: PROCEDURE
[id="oadp-restore-single-vm_{context}"]
= Restoring a single VM
[role="_abstract"]
After you have backed up a single virtual machine (VM) by using the label selector in the `Backup` custom resource (CR), you can create a `Restore` CR and point it to the backup. This restore operation restores a single VM.
.Prerequisites
* You have installed the {oadp-short} Operator.
* You have backed up a single VM by using the label selector.
.Procedure
. Configure the `Restore` CR as shown in the following example:
+
.Example `Restore` CR
[source,yaml]
----
apiVersion: velero.io/v1
kind: Restore
metadata:
name: vmrestoresingle
namespace: openshift-adp
spec:
backupName: vmbackupsingle # <1>
restorePVs: true
----
<1> Specifies the name of the backup of a single VM.
. To restore the single VM, run the following command:
+
[source, terminal]
----
$ oc apply -f <restore_cr_file_name> # <1>
----
<1> Specify the name of the `Restore` CR file.
+
[NOTE]
====
When you restore a backup of VMs, you might notice that the Ceph storage capacity allocated for the restore is higher than expected. This behavior is observed only during the `kubevirt` restore and if the volume type of the VM is `block`.
Use the `rbd sparsify` tool to reclaim space on target volumes. For more details, see link:https://access.redhat.com/documentation/en-us/red_hat_openshift_data_foundation/latest/html-single/managing_and_allocating_storage_resources/index#reclaiming-space-on-target-volumes_rhodf[Reclaiming space on target volumes].
====