Get-AzureRmSqlDatabaseLongTermRetentionBackup
Ottiene uno o più backup di conservazione a lungo termine.
Avviso
Il modulo AzureRM PowerShell è stato ufficialmente deprecato a partire dal 29 febbraio 2024. È consigliabile eseguire la migrazione da AzureRM al modulo Az PowerShell per garantire il supporto e gli aggiornamenti continui.
Anche se il modulo AzureRM può ancora funzionare, non è più gestito o supportato, posizionando qualsiasi uso continuo a discrezione e rischio dell'utente. Per indicazioni sulla transizione al modulo Az, vedere le risorse di migrazione.
Sintassi
Get-AzureRmSqlDatabaseLongTermRetentionBackup
[-Location] <String>
[-OnlyLatestPerDatabase]
[-DatabaseState <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzureRmSqlDatabaseLongTermRetentionBackup
[-Location] <String>
[-ServerName] <String>
[-DatabaseName <String>]
[-OnlyLatestPerDatabase]
[-DatabaseState <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzureRmSqlDatabaseLongTermRetentionBackup
[-Location] <String>
[-ServerName] <String>
-DatabaseName <String>
[-BackupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzureRmSqlDatabaseLongTermRetentionBackup
[-Location] <String>
[-ResourceId] <String>
[-BackupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzureRmSqlDatabaseLongTermRetentionBackup
[-Location] <String>
[-ResourceId] <String>
[-OnlyLatestPerDatabase]
[-DatabaseState <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzureRmSqlDatabaseLongTermRetentionBackup
[-InputObject] <AzureSqlDatabaseModel>
[-BackupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzureRmSqlDatabaseLongTermRetentionBackup
[-InputObject] <AzureSqlDatabaseModel>
[-OnlyLatestPerDatabase]
[-DatabaseState <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Descrizione
Il cmdlet Get-AzureRmSqlDatabaseLongTermRetentionBackup ottiene tutti i backup di conservazione a lungo termine per un percorso, un server o un database o ottiene un backup di conservazione a lungo termine specifico.
Esempio
Esempio 1: Ottenere tutti i backup per un percorso
PS C:\> Get-AzureRmSqlDatabaseLongTermRetentionBackup -Location northeurope
BackupExpirationTime : 3/22/2018 11:43:18 PM
BackupName : 55970792-164c-4a4a-88e5-7158d092d503;131656309980000000
BackupTime : 3/15/2018 11:43:18 PM
DatabaseName : database02
DatabaseDeletionTime : 3/18/2018 4:36:00 PM
Location : northeurope
ResourceId : /subscriptions/371edd6d-9630-4558-a7bd-ee139498e6a1/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server02/longTermRetentionDatabases/database02/longTermRetentionBackups/55970792-164c-4a4a-88e5-7158d092d503;131656309980000000
ServerName : server02
ServerCreateTime : 2/28/2018 12:12:19 AM
BackupExpirationTime : 3/22/2018 5:50:55 AM
BackupName : 601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
BackupTime : 3/15/2018 5:50:55 AM
DatabaseName : database01
DatabaseDeletionTime :
Location : northeurope
ResourceId : /subscriptions/371edd6d-9630-4558-a7bd-ee139498e6a1/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/database01/longTermRetentionBackups/601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
ServerName : server01
ServerCreateTime : 2/29/2018 12:12:19 AM
Questo comando ottiene tutti i backup di conservazione a lungo termine per tutti i database (che possono essere attivi o eliminati) in northeurope.
Esempio 2: Ottenere un backup di conservazione a lungo termine specifico
PS C:\> Get-AzureRmSqlDatabaseLongTermRetentionBackup -Location northeurope -ServerName server01 -DatabaseName database01 -BackupName "601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000"
BackupExpirationTime : 3/22/2018 5:50:55 AM
BackupName : 601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
BackupTime : 3/15/2018 5:50:55 AM
DatabaseName : database01
DatabaseDeletionTime :
Location : northeurope
ResourceId : /subscriptions/371edd6d-9630-4558-a7bd-ee139498e6a1/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/database01/longTermRetentionBackups/601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
ServerName : server01
ServerCreateTime : 2/29/2018 12:12:19 AM
Questo comando ottiene il backup con nome 601061b7-d10b-46e0-bf77-a2bfb16a6add; 131655666550000000
Esempio 3: Ottenere tutti i backup di conservazione a lungo termine per un database
PS C:\> Get-AzureRmSqlDatabase -ResourceGroupName resourcegroup01 -ServerName server01 -DatabaseName database01 | Get-AzureRmSqlDatabaseLongTermRetentionBackup
BackupExpirationTime : 3/22/2018 5:50:55 AM
BackupName : 601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
BackupTime : 3/15/2018 5:50:55 AM
DatabaseName : database01
DatabaseDeletionTime :
Location : northeurope
ResourceId : /subscriptions/371edd6d-9630-4558-a7bd-ee139498e6a1/providers/Microsoft.Sql/locations/northeurope/longTermRetentionServers/server01/longTermRetentionDatabases/database01/longTermRetentionBackups/601061b7-d10b-46e0-bf77-a2bfb16a6add;131655666550000000
ServerName : server01
ServerCreateTime : 2/29/2018 12:12:19 AM
Questo comando ottiene tutti i backup di conservazione a lungo termine per database01
Parametri
-BackupName
Nome del backup.
Type: | String |
Position: | 3 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Richiede conferma prima di eseguire il cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DatabaseName
Nome del database SQL di Azure da cui proviene il backup.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DatabaseState
Stato del database di cui si desidera trovare i backup, Alive, Deleted o All. Il valore predefinito è Tutti
Type: | String |
Accepted values: | All, Deleted, Live |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
Le credenziali, l’account, il tenant e la sottoscrizione usati per comunicare con Azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Oggetto di database per cui ottenere i backup.
Type: | AzureSqlDatabaseModel |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Location
Percorso del server di origine dei backup.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnlyLatestPerDatabase
Indica se ottenere o meno solo il backup più recente per ogni database. Il valore predefinito è falso.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
ID risorsa del database per cui ottenere i backup.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ServerName
Il nome di Azure SQL Server in cui si trovano i backup.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Mostra gli effetti dell'esecuzione del cmdlet. Il cmdlet non viene eseguito.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Input
Parametri: InputObject (ByValue)
Output
AzureSqlDatabaseLongTermRetentionBackupModel