Skip to main content

datacenter_backups

Creates, updates, deletes, gets or lists a datacenter_backups resource.

Overview​

Namedatacenter_backups
TypeResource
Idovh.dedicated_cloud.datacenter_backups

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
vmware_vm_idstringThe moref of the backup server virtual machine (wire: vmwareVmId)
backup_duration_in_reportbooleanDuration on email report (wire: backupDurationInReport)
backup_offerstringBackup offer type (advanced, backup, classic, legacy, premium) (wire: backupOffer)
backup_size_in_reportbooleanBackup size on day on email report (wire: backupSizeInReport)
disk_size_in_reportbooleanDisk size on mail report (wire: diskSizeInReport)
encryptionbooleanBackup is encrypted
full_day_in_reportbooleanFull day on mail report (wire: fullDayInReport)
hostnamestringName of the backup server virtual machine.
mail_addressstringUnique additional email address for backup daily report (wire: mailAddress)
replication_zonestringBackup replication zone (wire: replicationZone)
restore_point_in_reportbooleanRestorePoint number on mail report (wire: restorePointInReport)
schedule_hourstring (time)Schedule hour for start backup (example: 15:04:05) (wire: scheduleHour)
statestringThis Backup current state (disabled, disabling, enabled, enabling, error, migrating, removing)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdatacenter_id, service_nameGet the backup option. Returns the backup option of the datacenter: offer, state, schedule hour, encryption and report settings.
batch_restoreexecdatacenterId, serviceName, backupRepositoryNameRestore the last backups. Restores each backup job, or a single virtual machine, from its last restore point. Find the repository and job names in the report sent by generateReport. Returns a task to track progress.
change_propertiesexecdatacenterId, serviceName, backupOfferUpdate the backup option. Changes the backup offer, the schedule hour (UTC) and the additional email address for the daily report. Returns a task to track progress.
disableexecdatacenterId, serviceNameDisable the backup option. Disables the backup option of the datacenter. Returns a task to track progress.
generate_reportexecdatacenterId, serviceNameSend a backup report. Sends a report with all backup information by email. Returns a task to track progress.
optimize_proxiesexecdatacenterId, serviceNameOptimize backup proxies. Optimizes the number of backup proxies of the datacenter. Returns a task to track progress.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
datacenterIdintegerId of the Datacenter
datacenter_idintegerId of the Datacenter (wire: datacenterId)
serviceNamestringDomain of the service
service_namestringDomain of the service (wire: serviceName)

SELECT examples​

Get the backup option. Returns the backup option of the datacenter: offer, state, schedule hour, encryption and report settings.

SELECT
vmware_vm_id,
backup_duration_in_report,
backup_offer,
backup_size_in_report,
disk_size_in_report,
encryption,
full_day_in_report,
hostname,
mail_address,
replication_zone,
restore_point_in_report,
schedule_hour,
state
FROM ovh.dedicated_cloud.datacenter_backups
WHERE datacenter_id = '{{ datacenter_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Restore the last backups. Restores each backup job, or a single virtual machine, from its last restore point. Find the repository and job names in the report sent by generateReport. Returns a task to track progress.

EXEC ovh.dedicated_cloud.datacenter_backups.batch_restore
@datacenterId='{{ datacenterId }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"backupJobName": "{{ backupJobName }}",
"backupRepositoryName": "{{ backupRepositoryName }}"
}'
;