cohesity / cohesity.dataprotect / 1.1.9 / module / cohesity_restore_file Restore Files and Folders from Cohesity Protection Jobs | "added in version" 1.1.9 of cohesity.dataprotect" Authors: Naveena (@naveena-maplelabs)cohesity.dataprotect.cohesity_restore_file (1.1.9) — module
Install with ansible-galaxy collection install cohesity.dataprotect:==1.1.9
collections: - name: cohesity.dataprotect version: 1.1.9
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 a single file from a PhysicalFiles Windows Backup - cohesity_restore_file: cluster: cohesity.lab username: admin password: password state: present name: Restore Single File job_name: myhost environment: PhysicalFiles endpoint: mywindows.host.lab file_names: - C:\data\big_file wait_for_job: no
# Restore a single file from a GenericNas NFS Backup and wait for the job to complete - cohesity_restore_file: cluster: cohesity.lab username: admin password: password state: present name: Restore Single File to NFS Location job_name: mynfs environment: GenericNas endpoint: mynfs.host.lab:/exports file_names: - /data restore_location: /restore wait_for_job: yes
# Restore multiple files from a specific Physical Windows Backup and wait for up to 10 minutes for the process to complete - cohesity_restore_file: cluster: cohesity.lab username: admin password: password state: present name: Restore Single File job_name: myhost environment: Physical endpoint: mywindows.host.lab file_names: - C:\data\files - C:\data\large_directory wait_for_job: yes wait_minutes: 10
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 endpoint: description: - Specifies the network endpoint of the Protection Source where it is reachable. It could - be an URL or hostname or an IP address of the Protection Source or a NAS Share/Export Path. required: true type: str job_name: description: - Name of the Protection Job required: true type: str backup_id: description: - Optional Cohesity ID to use as source for the Restore operation. If not selected, the most recent RunId will be used type: int 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: choices: - PhysicalFiles - Physical - GenericNas default: PhysicalFiles description: - Specifies the environment type (such as PhysicalFiles or Physical or GenericNas) of the Protection Job - . Supported environment types include 'PhysicalFiles', 'GenericNas' required: false 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