Get-AzSqlInstanceDatabaseLongTermRetentionBackup
Gets long term retention backup(s).
Syntax
Location (Default)
Get-AzSqlInstanceDatabaseLongTermRetentionBackup
[-Location] <String>
[-ResourceGroupName <String>]
[-OnlyLatestPerDatabase]
[-DatabaseState <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
InstanceName
Get-AzSqlInstanceDatabaseLongTermRetentionBackup
[-Location] <String>
[-InstanceName] <String>
[-ResourceGroupName <String>]
[-OnlyLatestPerDatabase]
[-DatabaseState <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
DatabaseName
Get-AzSqlInstanceDatabaseLongTermRetentionBackup
[-Location] <String>
[-InstanceName] <String>
[-DatabaseName] <String>
[-ResourceGroupName <String>]
[-OnlyLatestPerDatabase]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
BackupName
Get-AzSqlInstanceDatabaseLongTermRetentionBackup
[-Location] <String>
[-InstanceName] <String>
[-DatabaseName] <String>
[-BackupName] <String>
[-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
GetBackupByResourceId
Get-AzSqlInstanceDatabaseLongTermRetentionBackup
[-Location] <String>
[-ResourceId] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzSqlInstanceDatabaseLongTermRetentionBackup
[-InputObject] <AzureSqlManagedDatabaseModel>
[-BackupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzSqlInstanceDatabaseLongTermRetentionBackup
[-InputObject] <AzureSqlManagedDatabaseModel>
[-OnlyLatestPerDatabase]
[-DatabaseState <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Get-AzSqlInstanceDatabaseLongTermRetentionBackup cmdlet gets long term retention backup(s).
Examples
Example 1
Get-AzSqlInstanceDatabaseLongTermRetentionBackup -Location southeastasia -ResourceGroupName testResourceGroup -InstanceName testInstance -DatabaseName test
BackupExpirationTime : 3/10/2020 1:10:45 PM
BackupName : 15be823c-7e2c-49d8-819f-a3fdcad92215;132268250550000000
BackupTime : 2/22/2020 6:04:15 AM
DatabaseName : test
DatabaseDeletionTime : 2/24/2020 2:56:44 PM
Location : southeastasia
ResourceId : /subscriptions/f46521f3-5bb0-4eea-a3c2-c2d5987df96b/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/southeastasia/longTermRetentionManaged
Instances/testInstance/longTermRetentionDatabases/test/longTermRetentionManagedInstanceBackups/15be823c-7e2c-49d8-819f-a3fdcad92215;132268250550000000
ManagedInstanceName : testInstance
InstanceCreateTime : 10/17/2019 4:52:10 PM
ResourceGroupName : testResourceGroup
Gets all long term retention backups for a particular database. Resource Group is optional.
Parameters
-BackupName
The name of the backup.
Parameter properties
Type: String
Default value: None
Supports wildcards: True
DontShow: False
Parameter sets
BackupName
Position: 3
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
GetBackupByInputObject
Position: 3
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
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 Managed Database the backups are under.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
DatabaseName
Position: 2
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
BackupName
Position: 2
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DatabaseState
The state of the database whose backups you want to find, Alive, Deleted, or All.
Defaults to All
Parameter properties
Type: String
Default value: None
Accepted values: All, Deleted, Live
Supports wildcards: False
DontShow: False
Parameter sets
Location
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
InstanceName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
GetBackupsByInputObject
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
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 object to get backups for.
GetBackupByInputObject
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
GetBackupsByInputObject
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-InstanceName
The name of the Managed Instance the backups are under.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
InstanceName
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
DatabaseName
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
BackupName
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Location
The location of the backups' source Managed Instance.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Location
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
InstanceName
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
DatabaseName
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
BackupName
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetBackupByResourceId
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-OnlyLatestPerDatabase
Whether or not to only get the latest backup per database.
Defaults to false.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Location
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
InstanceName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
DatabaseName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
GetBackupsByInputObject
Position: Named
Mandatory: False
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
Location
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
InstanceName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
DatabaseName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
BackupName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceId
The database Resource ID to get backups for.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
GetBackupByResourceId
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
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