Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/ResourceManager/Sql/AzureRM.Sql.Netcore.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,7 @@ CmdletsToExport = 'Get-AzureRmSqlDatabaseTransparentDataEncryption',
'Remove-AzureRmSqlDatabaseLongTermRetentionBackup',
'Get-AzureRmSqlDeletedDatabaseBackup',
'Get-AzureRmSqlDatabaseGeoBackup',
'Get-AzureRmSqlServerBackupLongTermRetentionVault',
'Restore-AzureRmSqlDatabase',
'Set-AzureRmSqlServerBackupLongTermRetentionVault',
'Get-AzureRmSqlDatabaseRestorePoints',
'Get-AzureRmSqlDatabaseAuditingPolicy',
'Get-AzureRmSqlServerAuditingPolicy',
Expand Down
3 changes: 3 additions & 0 deletions src/ResourceManager/Sql/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
- Additional information about change #1
-->
## Current Release
* Deprecated unsupported LongTermRetention cmdlets:
* Get-AzureRmSqlServerBackupLongTermRetentionVault
* Set-AzureRmSqlServerBackupLongTermRetentionVault

## Version 4.8.1-preview
* Bug fixes for cmdlets in Elastic Jobs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,6 @@ public void TestRestorePointInTimeBackup()
RunPowerShellTest("Test-RestorePointInTimeBackup");
}
}
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestServerBackupLongTermRetentionVault()
{
// TODO Rewrite SQL backup tests to be recordable
// TODO https://github.com/Azure/azure-powershell/issues/4155
if (TestMockSupport.RunningMocked)
{
RunPowerShellTest("Test-ServerBackupLongTermRetentionVault");
}
}
[Fact(Skip = "LTR-V1 restore service is retiring in Prod.")]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestRestoreLongTermRetentionBackup()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,6 @@ function Test-RestorePointInTimeBackup
-ServerName $db.ServerName -ResourceId $db.ResourceId -Edition 'GeneralPurpose' -VCore 2 -ComputeGeneration 'Gen4'
}

function Test-ServerBackupLongTermRetentionVault
{
$location = "North Europe"
$serverVersion = "12.0"
$rg = Get-AzureRmResourceGroup -ResourceGroupName hchung
$server = Get-AzureRmSqlServer -ServerName hchung-testsvr -ResourceGroupName $rg.ResourceGroupName
$vaultResourceId = "/subscriptions/e5e8af86-2d93-4ebd-8eb5-3b0184daa9de/resourceGroups/hchung/providers/Microsoft.RecoveryServices/vaults/hchung-testvault"

# set
Set-AzureRmSqlServerBackupLongTermRetentionVault -ServerName $server.ServerName -ResourceGroupName $rg.ResourceGroupName -ResourceId $vaultResourceId
# get
$result = Get-AzureRmSqlServerBackupLongTermRetentionVault -ServerName $server.ServerName -ResourceGroupName $rg.ResourceGroupName
#verify
Assert-True { $result.RecoveryServicesVaultResourceId -eq $vaultResourceId }
}

function Test-DatabaseBackupLongTermRetentionPolicy
{
$location = "North Europe"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
using System.Management.Automation;
using Microsoft.Azure.Commands.Sql.Backup.Model;
using Microsoft.Azure.Commands.Sql.Database.Model;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;

namespace Microsoft.Azure.Commands.Sql.Backup.Cmdlet
{
[CmdletDeprecation]
[Cmdlet(VerbsCommon.Get, "AzureRmSqlServerBackupLongTermRetentionVault", SupportsShouldProcess = true)]
public class GetAzureSqlServerBackupLongTermRetentionVault : AzureSqlServerBackupLongTermRetentionVaultCmdletBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
using System.Management.Automation;
using Microsoft.Azure.Commands.Sql.Backup.Model;
using Microsoft.Azure.Commands.Sql.Database.Model;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;

namespace Microsoft.Azure.Commands.Sql.Backup.Cmdlet
{
/// <summary>
/// Cmdlet to create or update a new Azure Sql Server backup archival vault
/// </summary>
[CmdletDeprecation]
[Cmdlet(VerbsCommon.Set, "AzureRmSqlServerBackupLongTermRetentionVault",
SupportsShouldProcess = true,
ConfirmImpact = ConfirmImpact.Low)]
Expand Down