Long-term backup retention list is not available

扶醉桌前 提交于 2019-12-12 00:50:38

问题


If user is owner of the resource group and SQL server instance in it, he/she can configure LTR polices. However, when trying to list them in Available backups tab... nothing is there. Same applies to the DB restore when Long-term backup retention is selected. Is anyone aware of some role or resource access that could resolve this?

p.s. Vault is not used any more.

[RESOLUTION] 'SQL Server contributor' role on the subscription level resolves it. Anyway, thanks everyone.


回答1:


As a workaround, you can try using PowerShell to list the LTR backups within a server:

# Get the list of all LTR backups in a specific Azure region 
# The backups are grouped by the logical database id.
# Within each group they are ordered by the timestamp, the earliest
# backup first.  
$ltrBackups = Get-AzureRmSqlDatabaseLongTermRetentionBackup -LocationName $server.Location 

# Get the list of LTR backups from the Azure region under 
# the named server. 
$ltrBackups = Get-AzureRmSqlDatabaseLongTermRetentionBackup -LocationName $server.Location -ServerName $serverName

# Get the LTR backups for a specific database from the Azure region under the named server 
$ltrBackups = Get-AzureRmSqlDatabaseLongTermRetentionBackup -LocationName $server.Location -ServerName $serverName -DatabaseName $dbName

# List LTR backups only from live databases (you have option to choose All/Live/Deleted)
$ltrBackups = Get-AzureRmSqlDatabaseLongTermRetentionBackup -LocationName $server.Location -DatabaseState Live

# Only list the latest LTR backup for each database 
$ltrBackups = Get-AzureRmSqlDatabaseLongTermRetentionBackup -LocationName $server.Location -ServerName $serverName -OnlyLatestPerDatabase

Make sure you have configured LTR backups correctly as explained here.



来源:https://stackoverflow.com/questions/51071129/long-term-backup-retention-list-is-not-available

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!