Skip to main content

long_term_retention_backups

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

Overview

Namelong_term_retention_backups
TypeResource
Idazure.sql.long_term_retention_backups

Fields

NameDatatypeDescription
backupNametextfield from the properties object
backup_expiration_timetextfield from the properties object
backup_storage_access_tiertextfield from the properties object
backup_storage_redundancytextfield from the properties object
backup_timetextfield from the properties object
database_deletion_timetextfield from the properties object
database_nametextfield from the properties object
is_backup_immutabletextfield from the properties object
locationNametextfield from the properties object
longTermRetentionDatabaseNametextfield from the properties object
longTermRetentionServerNametextfield from the properties object
requested_backup_storage_redundancytextfield from the properties object
resourceGroupNametextfield from the properties object
server_create_timetextfield from the properties object
server_nametextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTbackupName, locationName, longTermRetentionDatabaseName, longTermRetentionServerName, subscriptionIdGets a long term retention backup.
get_by_resource_groupSELECTbackupName, locationName, longTermRetentionDatabaseName, longTermRetentionServerName, resourceGroupName, subscriptionIdGets a long term retention backup.
list_by_databaseSELECTlocationName, longTermRetentionDatabaseName, longTermRetentionServerName, subscriptionIdLists all long term retention backups for a database.
list_by_locationSELECTlocationName, subscriptionIdLists the long term retention backups for a given location.
list_by_resource_group_databaseSELECTlocationName, longTermRetentionDatabaseName, longTermRetentionServerName, resourceGroupName, subscriptionIdLists all long term retention backups for a database based on a particular resource group.
list_by_resource_group_locationSELECTlocationName, resourceGroupName, subscriptionIdLists the long term retention backups for a given location based on resource group.
list_by_resource_group_serverSELECTlocationName, longTermRetentionServerName, resourceGroupName, subscriptionIdLists the long term retention backups for a given server based on resource groups.
list_by_serverSELECTlocationName, longTermRetentionServerName, subscriptionIdLists the long term retention backups for a given server.
deleteDELETEbackupName, locationName, longTermRetentionDatabaseName, longTermRetentionServerName, subscriptionIdDeletes a long term retention backup.
delete_by_resource_groupDELETEbackupName, locationName, longTermRetentionDatabaseName, longTermRetentionServerName, resourceGroupName, subscriptionIdDeletes a long term retention backup.
change_access_tierEXECbackupName, locationName, longTermRetentionDatabaseName, longTermRetentionServerName, subscriptionId, data__backupStorageAccessTier, data__operationModeChange a long term retention backup access tier.
change_access_tier_by_resource_groupEXECbackupName, locationName, longTermRetentionDatabaseName, longTermRetentionServerName, resourceGroupName, subscriptionId, data__backupStorageAccessTier, data__operationModeChange a long term retention backup access tier.
copyEXECbackupName, locationName, longTermRetentionDatabaseName, longTermRetentionServerName, subscriptionIdCopy an existing long term retention backup.
copy_by_resource_groupEXECbackupName, locationName, longTermRetentionDatabaseName, longTermRetentionServerName, resourceGroupName, subscriptionIdCopy an existing long term retention backup to a different server.
updateEXECbackupName, locationName, longTermRetentionDatabaseName, longTermRetentionServerName, subscriptionIdUpdates an existing long term retention backup.
update_by_resource_groupEXECbackupName, locationName, longTermRetentionDatabaseName, longTermRetentionServerName, resourceGroupName, subscriptionIdUpdates an existing long term retention backup.

SELECT examples

Lists the long term retention backups for a given location.

SELECT
backupName,
backup_expiration_time,
backup_storage_access_tier,
backup_storage_redundancy,
backup_time,
database_deletion_time,
database_name,
is_backup_immutable,
locationName,
longTermRetentionDatabaseName,
longTermRetentionServerName,
requested_backup_storage_redundancy,
resourceGroupName,
server_create_time,
server_name,
subscriptionId
FROM azure.sql.vw_long_term_retention_backups
WHERE locationName = '{{ locationName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified long_term_retention_backups resource.

/*+ delete */
DELETE FROM azure.sql.long_term_retention_backups
WHERE backupName = '{{ backupName }}'
AND locationName = '{{ locationName }}'
AND longTermRetentionDatabaseName = '{{ longTermRetentionDatabaseName }}'
AND longTermRetentionServerName = '{{ longTermRetentionServerName }}'
AND subscriptionId = '{{ subscriptionId }}';