5.21.2. Using OADP virtual machine data protection
Install the OpenShift API for Data Protection virtual machine data protection (VMDP) command-line interface (CLI), configure a backup storage location, and back up and restore data from within your VM. This helps you to manage your own VM backups independently.
5.21.2.1. Installing the OADP virtual machine data protection CLI 링크 복사링크가 클립보드에 복사되었습니다!
Install the OpenShift API for Data Protection virtual machine data protection (VMDP) command-line interface (CLI) inside your VM to back up and restore data. This helps you to download the correct binary for your VM guest operating system.
The OADP Operator deploys a download server in the cluster as the openshift-adp-vmdp-server service in the openshift-adp namespace. A ConsoleCLIDownload resource links to the download server routes, and users can access the download links from the OpenShift Container Platform web console or by using HTTP directly.
Prerequisites
- You have installed the OADP Operator.
- You have a running VM on OpenShift Virtualization with a supported guest operating system.
-
You have installed the
virtctlCLI tool.
Procedure
Get the cluster IP of the VMDP download server by running the following command:
$ oc get svc -n openshift-adp openshift-adp-vmdp-serverMake a note of the
CLUSTER-IPvalue from the output.Install the VMDP CLI:
For Linux VMs, download the VMDP binary and make it executable inside the VM by running the following command:
$ virtctl ssh <vm_user>@<vm_name> -n <vm_namespace> \ --command "curl -kLf 'http://<cluster_ip>:80/download/oadp-vmdp_linux_amd64' \ -o oadp-vmdp_linux_amd64 && chmod +x oadp-vmdp_linux_amd64"where:
<vm_user>-
Specifies the username for the VM. For example,
fedora. <vm_name>- Specifies the name of the VM.
<vm_namespace>- Specifies the namespace of the VM.
<cluster_ip>-
Specifies the
CLUSTER-IPvalue of theopenshift-adp-vmdp-serverservice.
For Microsoft Windows VMs, access the VM by using Remote Desktop Protocol (RDP) or the VNC console, open PowerShell, and download the VMDP binary by running the following command:
PS> curl.exe -L -o oadp-vmdp.exe "http://<cluster_ip>:80/download/oadp-vmdp_windows_amd64.exe"Replace
<cluster_ip>with theCLUSTER-IPvalue of theopenshift-adp-vmdp-serverservice.
Verification
Depending on your operating system, use one of the following steps to verify the installation:
For Linux VMs, verify that the binary is installed and working by running the following command:
$ virtctl ssh <vm_user>@<vm_name> -n <vm_namespace> \ --command "./oadp-vmdp_linux_amd64 --help"usage: oadp-vmdp [<flags>] <command> [<args> ...] OADP VM Data Protection - Virtual Machine Data Protection for OpenShift Virtualization Flags: --[no-]help Show context-sensitive help (also try --help-long and --help-man). --[no-]version Show application version. --log-file=LOG-FILE Override log file. --[no-]disable-file-logging Disable file-based logging. ....For Microsoft Windows VMs, open PowerShell and verify the binary by running the following command:
PS> .\oadp-vmdp.exe --help