Update-AzSqlDatabaseLongTermRetentionBackup
Updates a long term retention backup.
Syntax
UpdateBackupDefault (Default)
Update-AzSqlDatabaseLongTermRetentionBackup
[-Location] <String>
[-ServerName] <String>
[-DatabaseName] <String>
[-BackupName] <String>
[-ResourceGroupName <String>]
[-BackupStorageRedundancy <String>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
UpdateBackupByResourceId
Update-AzSqlDatabaseLongTermRetentionBackup
[-ResourceId] <String>
[-BackupStorageRedundancy <String>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzSqlDatabaseLongTermRetentionBackup
[-InputObject] <AzureSqlDatabaseLongTermRetentionBackupModel>
[-BackupStorageRedundancy <String>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Updates the properties of a long term retention backup.
Examples
Example 1: Update Backup Storage Redundancy of a long term retention backup.
Update-AzSqlDatabaseLongTermRetentionBackup -Location southeastasia -ServerName ayang-stage-seas -DatabaseName ltr3 -BackupName 'e5c20f43-494c-4925-89d1-58e0f4569fb3;132579992320000000' -ResourceGroupName testrg -BackupStorageRedundancy Geo
BackupExpirationTime : 3/19/2021 1:33:52 AM
BackupName : e5c20f43-494c-4925-89d1-58e0f4569fb3;132579992320000000
BackupTime : 2/17/2021 1:33:52 AM
DatabaseName : ltr3
DatabaseDeletionTime : 3/16/2021 6:28:11 AM
Location : southeastasia
ResourceId : /subscriptions/01c4ec88-e179-44f7-9eb0-e9719a5087ab/resourceGroups/testrg/providers/Microsoft.Sql/locations/southeastasia/longTermRetentionServers/ayang-stage-seas/longTermRetentionDatabases/ltr3/longTermRetentionBackups/e5c20f43-494c-4925-89d1-58e0f4569fb3;132579992320000000
ServerName : ayang-stage-seas
ServerCreateTime : 4/22/2020 9:58:33 PM
ResourceGroupName : testrg
BackupStorageRedundancy : Geo
This command sets the Backup Storage Redundancy of the specified backup using location and Resource Group, Server, Database, and Backup names.
Example 2: Update Backup Storage Redundancy of a long term retention backup (using Resource Id).
Update-AzSqlDatabaseLongTermRetentionBackup -ResourceId '/subscriptions/01c4ec88-e179-44f7-9eb0-e9719a5087ab/resourceGroups/testrg/providers/Microsoft.Sql/locations/southeastasia/longTermRetentionServers/ayang-stage-seas/longTermRetentionDatabases/ltr3/longTermRetentionBackups/e5c20f43-494c-4925-89d1-58e0f4569fb3;132579992320000000' -BackupStorageRedundancy Geo
BackupExpirationTime : 3/19/2021 1:33:52 AM
BackupName : e5c20f43-494c-4925-89d1-58e0f4569fb3;132579992320000000
BackupTime : 2/17/2021 1:33:52 AM
DatabaseName : ltr3
DatabaseDeletionTime : 3/16/2021 6:28:11 AM
Location : southeastasia
ResourceId : /subscriptions/01c4ec88-e179-44f7-9eb0-e9719a5087ab/resourceGroups/testrg/providers/Microsoft.Sql/locations/southeastasia/longTermRetentionServers/ayang-stage-seas/longTermRetentionDatabases/ltr3/longTermRetentionBackups/e5c20f43-494c-4925-89d1-58e0f4569fb3;132579992320000000
ServerName : ayang-stage-seas
ServerCreateTime : 4/22/2020 9:58:33 PM
ResourceGroupName : testrg
BackupStorageRedundancy : Geo
This command sets the Backup Storage Redundancy of the specified backup using a backup Resource Id.
Parameters
-AsJob
Run cmdlet in the background
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-BackupName
The name of the backup.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateBackupDefault
Position: 3
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-BackupStorageRedundancy
The Backup storage redundancy used to store backups for the SQL Database.
Options are: Local, Zone and Geo.
Parameter properties
Type: String
Default value: None
Accepted values: Local, Zone, Geo
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DatabaseName
The name of the Azure SQL Database the backup is from.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateBackupDefault
Position: 2
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
The Database Long Term Retention Backup object to update.
UpdateByInputObjectSet
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-Location
The location of the backup's source server.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateBackupDefault
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the resource group.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateBackupDefault
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceId
The Resource ID of the Database Long Term Retention Backup to remove.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateBackupByResourceId
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-ServerName
The name of the Azure SQL Server the backup is under.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateBackupDefault
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs