cohesity / cohesity.dataprotect / 1.0.10 / module / cohesity_restore_vmware_file Restore Files and Folders from Cohesity Protection Jobs | "added in version" 1.0.10 of cohesity.dataprotect" Authors: Naveena (@naveena-maplelabs)cohesity.dataprotect.cohesity_restore_vmware_file (1.0.10) — module
Install with ansible-galaxy collection install cohesity.dataprotect:==1.0.10
collections: - name: cohesity.dataprotect version: 1.0.10
Ansible Module used to start a Cohesity Recovery Job on a Cohesity Cluster.
When executed in a playbook, the Cohesity Recovery Job will be validated and the appropriate state action
will be applied.
# Restore multiple files from a specific VMware Backup and wait for up to 10 minutes for the process to complete - cohesity_restore_vmware_file: cluster: cohesity.lab username: admin password: password state: present name: Restore Single File job_name: myhost endpoint: myvcenter.host.lab file_names: - C:\data\files - C:\data\large_directory vm_name: "demo" vm_username: admin vm_password: admin wait_for_job: yes wait_minutes: 10
# Restore a single file from a VMware VM Backup - cohesity_restore_vmware_file: name: "Ansible File Restore to Virtual Machine" environment: "VMware" job_name: "myvm.demo" endpoint: "myvcenter.cohesity.demo" files: - "/home/cohesity/sample" wait_for_job: True state: "present" backup_timestamp: 2021-04-11:21:37 restore_location: /home/cohesity/ vm_name: "demo" vm_username: admin vm_password: admin
name: description: - Descriptor to assign to the Recovery Job. The Recovery Job name will consist of the job_name:name format. required: true type: str state: choices: - present - absent default: present description: - Determines the state of the Recovery Job. - (C)present a recovery job will be created and started. - (C)absent is currently not implemented type: str cluster: aliases: - cohesity_server description: - IP or FQDN for the Cohesity Cluster type: str vm_name: description: - Name of the Vcenter virtual machine, from where the files are located. Required if the environment is VMware. type: str endpoint: description: - Specifies the name of Vcenter where file is located. required: true type: str job_name: description: - Name of the Protection Job required: true type: str overwrite: default: true description: - Should the restore operation overwrite the files or folders if they exist. type: bool file_names: description: - Array of Files and Folders to restore elements: str required: true type: list environment: default: VMware description: Environment type of the restore. type: str vm_password: description: - Password of the virtual machine, where files will be restored. Required if the environment is VMware. type: str vm_username: description: - Username of the virtual machine, where files will be restored. Required if the environment is VMware. type: str wait_for_job: default: true description: - Should wait until the Restore Job completes type: bool wait_minutes: default: 10 description: - Number of minutes to wait until the job completes. type: int cohesity_admin: aliases: - admin_name - cohesity_user - username description: - Username with which Ansible will connect to the Cohesity Cluster. Domain Specific credentails - can be configured in one of two formats - username@domain or Domain/username (will be deprecated in future). type: str validate_certs: aliases: - cohesity_validate_certs default: true description: - Switch determines if SSL Validation should be enabled. type: bool backup_timestamp: description: - protection run timestamp in YYYY-MM-DD:HH:MM format to use as source for the Restore operation. If not specified, the most recent timestamp is used type: str restore_location: description: - Alternate location to which the files will be restored type: str cohesity_password: aliases: - password - admin_pass description: - Password belonging to the selected Username. This parameter will not be logged. type: str preserve_attributes: default: true description: - Should the restore operation maintain the original file or folder attributes type: bool