Editar

Compartilhar via


Update-AzSqlDatabaseLongTermRetentionBackup

Updates a long term retention backup.

Syntax

Update-AzSqlDatabaseLongTermRetentionBackup
      [-Location] <String>
      [-ServerName] <String>
      [-DatabaseName] <String>
      [-BackupName] <String>
      [-ResourceGroupName <String>]
      [-BackupStorageRedundancy <String>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzSqlDatabaseLongTermRetentionBackup
      [-ResourceId] <String>
      [-BackupStorageRedundancy <String>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzSqlDatabaseLongTermRetentionBackup
      [-BackupStorageRedundancy <String>]
      [-InputObject] <AzureSqlDatabaseLongTermRetentionBackupModel>
      [-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 'b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;132579992320000000' -ResourceGroupName testrg -BackupStorageRedundancy Geo

BackupExpirationTime             : 3/19/2021 1:33:52 AM
BackupName                       : b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;132579992320000000
BackupTime                       : 2/17/2021 1:33:52 AM
DatabaseName                     : ltr3
DatabaseDeletionTime             : 3/16/2021 6:28:11 AM
Location                         : southeastasia
ResourceId                       : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/testrg/providers/Microsoft.Sql/locations/southeastasia/longTermRetentionServers/ayang-stage-seas/longTermRetentionDatabases/ltr3/longTermRetentionBackups/b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;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/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/testrg/providers/Microsoft.Sql/locations/southeastasia/longTermRetentionServers/ayang-stage-seas/longTermRetentionDatabases/ltr3/longTermRetentionBackups/b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;132579992320000000' -BackupStorageRedundancy Geo

BackupExpirationTime             : 3/19/2021 1:33:52 AM
BackupName                       : b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;132579992320000000
BackupTime                       : 2/17/2021 1:33:52 AM
DatabaseName                     : ltr3
DatabaseDeletionTime             : 3/16/2021 6:28:11 AM
Location                         : southeastasia
ResourceId                       : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/testrg/providers/Microsoft.Sql/locations/southeastasia/longTermRetentionServers/ayang-stage-seas/longTermRetentionDatabases/ltr3/longTermRetentionBackups/b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-BackupName

The name of the backup.

Type:String
Position:3
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-BackupStorageRedundancy

The Backup storage redundancy used to store backups for the SQL Database. Options are: Local, Zone and Geo.

Type:String
Accepted values:Local, Zone, Geo
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DatabaseName

The name of the Azure SQL Database the backup is from.

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

The Database Long Term Retention Backup object to update.

Type:AzureSqlDatabaseLongTermRetentionBackupModel
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Location

The location of the backup's source server.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

The Resource ID of the Database Long Term Retention Backup to remove.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ServerName

The name of the Azure SQL Server the backup is under.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Outputs

AzureSqlDatabaseLongTermRetentionBackupModel