Get-AzSqlDatabaseLongTermRetentionBackup
Obtém um ou mais backups de retenção de longo prazo.
Sintaxe
Get-AzSqlDatabaseLongTermRetentionBackup
[-Location] <String>
[-ResourceGroupName <String>]
[-OnlyLatestPerDatabase]
[-DatabaseState <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzSqlDatabaseLongTermRetentionBackup
[-Location] <String>
[-ServerName] <String>
[-DatabaseName <String>]
[-ResourceGroupName <String>]
[-OnlyLatestPerDatabase]
[-DatabaseState <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzSqlDatabaseLongTermRetentionBackup
[-Location] <String>
[-ServerName] <String>
-DatabaseName <String>
[-BackupName] <String>
[-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzSqlDatabaseLongTermRetentionBackup
[-Location] <String>
[-ResourceId] <String>
[-BackupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzSqlDatabaseLongTermRetentionBackup
[-Location] <String>
[-ResourceId] <String>
[-OnlyLatestPerDatabase]
[-DatabaseState <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzSqlDatabaseLongTermRetentionBackup
[-InputObject] <AzureSqlDatabaseModel>
[-BackupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzSqlDatabaseLongTermRetentionBackup
[-InputObject] <AzureSqlDatabaseModel>
[-OnlyLatestPerDatabase]
[-DatabaseState <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
O cmdlet Get-AzSqlDatabaseLongTermRetentionBackup obtém todos os backups de retenção de longo prazo para um local, servidor ou banco de dados ou obtém um backup de retenção de longo prazo específico.
Exemplos
Exemplo 1: Obter todos os backups para um local
Get-AzSqlDatabaseLongTermRetentionBackup -Location northeurope
BackupExpirationTime : 3/22/2018 5:50:55 AM
BackupName : b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
BackupTime : 3/15/2018 5:50:55 AM
DatabaseName : database01
DatabaseDeletionTime :
Location : northeurope
ResourceId : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/resourcegroup01/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/database01/longTermRetentionBackups/b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
ServerName : server01
ServerCreateTime : 2/29/2018 12:12:19 AM
ResourceGroupName :
BackupStorageRedundancy : Geo
BackupExpirationTime : 3/22/2018 11:43:18 PM
BackupName : c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3;131656309980000000
BackupTime : 3/15/2018 11:43:18 PM
DatabaseName : database02
DatabaseDeletionTime : 3/18/2018 4:36:00 PM
Location : northeurope
ResourceId : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server02/longTermRetentionDatabases/database02/longTermRetentionBackups/c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3;131656309980000000
ServerName : server02
ServerCreateTime : 2/28/2018 12:12:19 AM
ResourceGroupName :
BackupStorageRedundancy : Geo
Este comando obtém todos os backups de retenção de longo prazo para todos os bancos de dados (que podem estar ativos ou excluídos) no sudeste da Ásia, o grupo de recursos será definido apenas se o servidor estiver ativo.
Exemplo 2: Obter todos os backups para um local em um grupo de recursos
Get-AzSqlDatabaseLongTermRetentionBackup -Location northeurope -ResourceGroupName resourceGroup01
BackupExpirationTime : 3/22/2018 5:50:55 AM
BackupName : b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
BackupTime : 3/15/2018 5:50:55 AM
DatabaseName : database01
DatabaseDeletionTime :
Location : northeurope
ResourceId : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/resourcegroup01/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/database01/longTermRetentionBackups/b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
ServerName : server01
ServerCreateTime : 2/29/2018 12:12:19 AM
ResourceGroupName : resourceGroup01
BackupStorageRedundancy : Geo
Este comando obtém todos os backups de retenção de longo prazo para todos os bancos de dados (que podem estar ativos ou excluídos) em um grupo de recursos no norte da Europa.
Exemplo 3: Obter um backup de retenção de longo prazo específico
Get-AzSqlDatabaseLongTermRetentionBackup -Location northeurope -ServerName server01 -DatabaseName database01 -BackupName "b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000"
BackupExpirationTime : 3/22/2018 5:50:55 AM
BackupName : b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
BackupTime : 3/15/2018 5:50:55 AM
DatabaseName : database01
DatabaseDeletionTime :
Location : northeurope
ResourceId : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/resourcegroup01/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/database01/longTermRetentionBackups/b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
ServerName : server01
ServerCreateTime : 2/29/2018 12:12:19 AM
ResourceGroupName :
BackupStorageRedundancy : Geo
Este comando obtém o backup com o nome b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2f2; 131655666550000000
Exemplo 4: Obter todos os backups de retenção de longo prazo para um banco de dados
Get-AzSqlDatabase -ResourceGroupName resourcegroup01 -ServerName server01 -DatabaseName database01 | Get-AzSqlDatabaseLongTermRetentionBackup
BackupExpirationTime : 3/22/2018 5:50:55 AM
BackupName : b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
BackupTime : 3/15/2018 5:50:55 AM
DatabaseName : database01
DatabaseDeletionTime :
Location : northeurope
ResourceId : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/resourcegroup01/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/database01/longTermRetentionBackups/b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
ServerName : server01
ServerCreateTime : 2/29/2018 12:12:19 AM
ResourceGroupName :
BackupStorageRedundancy : Geo
Este comando obtém todos os backups de retenção de longo prazo para o banco de dados01
Exemplo 5: Obter backups de retenção de longo prazo usando filtragem
Get-AzSqlDatabaseLongTermRetentionBackup -Location northeurope -ServerName server01 -DatabaseName database01 -BackupName "601061b7*"
BackupExpirationTime : 3/22/2018 11:43:18 PM
BackupName : d3d3d3d3-eeee-ffff-aaaa-b4b4b4b4b4b4;131656309980000000
BackupTime : 3/15/2018 11:43:18 PM
DatabaseName : database02
DatabaseDeletionTime : 3/18/2018 4:36:00 PM
Location : northeurope
ResourceId : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/resourcegroup01/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/database02/longTermRetentionBackups/d3d3d3d3-eeee-ffff-aaaa-b4b4b4b4b4b4;131656309980000000
ServerName : server01
ServerCreateTime : 2/28/2018 12:12:19 AM
ResourceGroupName :
BackupStorageRedundancy : Geo
BackupExpirationTime : 3/22/2018 5:50:55 AM
BackupName : b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
BackupTime : 3/15/2018 5:50:55 AM
DatabaseName : database01
DatabaseDeletionTime :
Location : northeurope
ResourceId : /subscriptions/a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1/resourceGroups/resourcegroup01/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/database01/longTermRetentionBackups/b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2;131655666550000000
ServerName : server01
ServerCreateTime : 2/29/2018 12:12:19 AM
ResourceGroupName :
BackupStorageRedundancy : Geo
Este comando obtém todos os backups com nome que começa com "601061b7"
Parâmetros
-BackupName
O nome do backup.
Tipo: | String |
Position: | 3 |
Default value: | None |
Necessário: | True |
Aceitar entrada de pipeline: | True |
Aceitar carateres universais: | True |
-Confirm
Solicita confirmação antes de executar o cmdlet.
Tipo: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-DatabaseName
O nome do Banco de Dados SQL do Azure do qual o backup é originário.
Tipo: | String |
Position: | Named |
Default value: | None |
Necessário: | True |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-DatabaseState
O estado do banco de dados cujos backups você deseja localizar, Vivo, Excluído ou Todos. Padrão para Todos
Tipo: | String |
Valores aceites: | All, Deleted, Live |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | True |
Aceitar carateres universais: | False |
-DefaultProfile
As credenciais, a conta, o locatário e a assinatura usados para comunicação com o Azure.
Tipo: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-InputObject
O objeto de banco de dados para o qual obter backups.
Tipo: | AzureSqlDatabaseModel |
Position: | 0 |
Default value: | None |
Necessário: | True |
Aceitar entrada de pipeline: | True |
Aceitar carateres universais: | False |
-Location
O local do servidor de origem dos backups.
Tipo: | String |
Position: | 0 |
Default value: | None |
Necessário: | True |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-OnlyLatestPerDatabase
Obter ou não apenas o backup mais recente por banco de dados. O padrão é false.
Tipo: | SwitchParameter |
Position: | Named |
Default value: | False |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-ResourceGroupName
O nome do grupo de recursos.
Tipo: | String |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-ResourceId
O ID de recurso do banco de dados para o qual obter backups.
Tipo: | String |
Position: | 0 |
Default value: | None |
Necessário: | True |
Aceitar entrada de pipeline: | True |
Aceitar carateres universais: | False |
-ServerName
O nome do SQL Server do Azure sob o qual os backups estão.
Tipo: | String |
Position: | 1 |
Default value: | None |
Necessário: | True |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-WhatIf
Mostra o que aconteceria se o cmdlet fosse executado. O cmdlet não é executado.
Tipo: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
Entradas
Saídas
AzureSqlDatabaseLongTermRetentionBackupModel
Ligações Relacionadas
Azure PowerShell