Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Get-AzSqlDeletedDatabaseBackup

Module:
Az.Sql Module

Gets a deleted database that you can restore.

Syntax

Default (Default)

Get-AzSqlDeletedDatabaseBackup
 [-ExpandKeyList]
 [-KeysFilter <String>]
 [-DatabaseId <String>]
 [-ServerName] <String>
 [[-DatabaseName] <String>]
 [[-DeletionDate] <DateTime>]
 [-ResourceGroupName] <String>
 [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

Description

The Get-AzSqlDeletedDatabaseBackup cmdlet gets a specified deleted SQL database backup that you can restore, or all deleted backups that you can restore. This cmdlet is also supported by the SQL Server Stretch Database service on Azure.

Examples

Example 1: Get all deleted database backups on a server

Get-AzSqlDeletedDatabaseBackup -ResourceGroupName "ContosoResourceGroup" -ServerName "ContosoServer"

This command gets all deleted database backups on a server.

Example 2: Get a specified deleted database backup

Get-AzSqlDeletedDatabaseBackup -ResourceGroupName "ContosoResourceGroup" -ServerName "ContosoServer" -DatabaseName "ContosoDatabase"

This command gets the deleted database backup for ContosoDatabase.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

-DatabaseId

Id of the database

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-DatabaseName

Specifies the name of the database.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-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

-DeletionDate

Specifies the date, as a DateTime object, that the database was deleted. To get a DateTime object, use the Get-Date cmdlet.

Parameter properties

Type:

Nullable<T>[DateTime]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ExpandKeyList

Flag to be used to view all the AKV keys in a database.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-KeysFilter

Timestamp filter to get AKV keys

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ResourceGroupName

Specifies the name of the resource group to which the server is assigned.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ServerName

Specifies the name of the database server.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

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.

Inputs

String

Nullable<T>

Outputs

AzureSqlDeletedDatabaseBackupModel

Related Links


Feedback

Was this page helpful?