Get-AzSqlDeletedInstanceDatabaseBackup
Gets a deleted database that you can restore.
Syntax
DeletedDatabaseList (Default)
Get-AzSqlDeletedInstanceDatabaseBackup
[-ResourceGroupName] <String>
[-InstanceName] <String>
[-DatabaseName <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
DeletedDatabaseByNameAndDeletedTime
Get-AzSqlDeletedInstanceDatabaseBackup
[-ResourceGroupName] <String>
[-InstanceName] <String>
[-DeletionDate] <DateTime>
-DatabaseName <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzSqlDeletedInstanceDatabaseBackup cmdlet gets a specified deleted SQL Instance database backup that you can restore, or all deleted backups that you can restore.
This cmdlet is also supported by the SQL Instance Stretch Database service on Azure.
Examples
Example 1: Get all deleted database backups on a server
Get-AzSqlDeletedInstanceDatabaseBackup -ResourceGroupName "ContosoResourceGroup" -InstanceName "ContosoServer"
DeletionDate : 2019-03-03 12:00:17 AM
ResourceGroupName : ContosoResourceGroup
ManagedInstanceName : ContosoServer
Name : DB1
CreationDate : 2019-03-02 11:00:51 PM
EarliestRestorePoint : 2019-03-02 11:05:30 PM
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ContosoResourceGroup/providers/Microsoft.
Sql/managedInstances/ContosoServer/restorableDroppedDatabases/DB1,13196044
8170400000
DeletionDate : 2019-03-02 11:00:16 PM
ResourceGroupName : ContosoResourceGroup
ManagedInstanceName : ContosoServer
Name : DB1
CreationDate : 2019-03-02 10:00:51 PM
EarliestRestorePoint : 2019-03-02 10:05:29 PM
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ContosoResourceGroup/providers/Microsoft.
Sql/managedInstances/ContosoServer/restorableDroppedDatabases/DB1,13196041
2168670000
DeletionDate : 2019-03-04 04:00:08 AM
ResourceGroupName : ContosoResourceGroup
ManagedInstanceName : ContosoServer
Name : DB3
CreationDate : 2019-03-04 03:00:31 AM
EarliestRestorePoint : 2019-03-04 03:05:23 AM
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ContosoResourceGroup/providers/Microsoft.
Sql/managedInstances/ContosoServer/restorableDroppedDatabases/DB3,13196145
6082100000
This command gets all deleted database backups on a server.
Example 2: Get a specified deleted database backup
Get-AzSqlDeletedInstanceDatabaseBackup -ResourceGroupName "ContosoResourceGroup" -InstanceName "ContosoServer" -DatabaseName "DB1"
DeletionDate : 2019-03-03 12:00:17 AM
ResourceGroupName : ContosoResourceGroup
ManagedInstanceName : ContosoServer
Name : DB1
CreationDate : 2019-03-02 11:00:51 PM
EarliestRestorePoint : 2019-03-02 11:05:30 PM
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ContosoResourceGroup/providers/Microsoft.
Sql/managedInstances/ContosoServer/restorableDroppedDatabases/DB1,13196044
8170400000
DeletionDate : 2019-03-02 11:00:16 PM
ResourceGroupName : ContosoResourceGroup
ManagedInstanceName : ContosoServer
Name : DB1
CreationDate : 2019-03-02 10:00:51 PM
EarliestRestorePoint : 2019-03-02 10:05:29 PM
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ContosoResourceGroup/providers/Microsoft.
Sql/managedInstances/ContosoServer/restorableDroppedDatabases/DB1,13196041
2168670000
Parameters
-DatabaseName
The name of the Azure SQL Instance Database to retrieve backups for.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
DeletedDatabaseList
Position: Named
Mandatory: False
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
-DeletionDate
The deletion date of the Azure SQL Instance Database to retrieve backups for, with millisecond precision (e.g. 2016-02-23T00:21:22.847Z)
Parameter properties
Parameter sets
DeletedDatabaseByNameAndDeletedTime
Position: 3
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-InstanceName
The name of the Azure SQL Managed Instance the database is in.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 1
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
(All)
Position: 0
Mandatory: True
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 .
None
Outputs