Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Az.RecoveryServices.Backup] Fixing SQL AG restore, removing the container name check #13744

Merged
merged 1 commit into from
Dec 16, 2020
Merged
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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -610,9 +610,6 @@ Please contact Microsoft for further assistance.</value>
<data name="TargetVaultStorageRedundancy" xml:space="preserve">
<value>Are you sure you want to copy items to the {0} whose storage redundancy is {1}</value>
</data>
<data name="ContainerNameIsInvalid" xml:space="preserve">
<value>container name is invalid.</value>
</data>
<data name="TargetResourcegroupNotSupported" xml:space="preserve">
<value>Target ResourceGroup is not applicable and restore will proceed as unmanaged disk restore since this is unmanaged VM</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,17 +279,7 @@ public void ValidateSQLSchedulePolicy(CmdletModel.SchedulePolicyBase policy)
// call validation
policy.Validate();
}

public void ValidateContainerName(String containerName)
{
if (!containerName.Contains(";"))
{
throw new ArgumentException(
string.Format(
Resources.ContainerNameIsInvalid));
}
}


public void ValidateLongTermRetentionPolicy(CmdletModel.RetentionPolicyBase policy, string backupManagementType = "")
{
if (policy == null || policy.GetType() != typeof(CmdletModel.LongTermRetentionPolicy))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class AzureWorkloadPsBackupProvider : IPsBackupProvider
Dictionary<Enum, object> ProviderData { get; set; }
ServiceClientAdapter ServiceClientAdapter { get; set; }
AzureWorkloadProviderHelper AzureWorkloadProviderHelper { get; set; }

/// <summary>
/// Initializes the provider with the data received from the cmdlet layer
/// </summary>
Expand Down Expand Up @@ -404,9 +405,6 @@ public RestAzureNS.AzureOperationResponse TriggerRestore()

if (wLRecoveryConfig.RecoveryPoint.ContainerName != null && wLRecoveryConfig.FullRP == null)
{
// validate container name to be a full name
AzureWorkloadProviderHelper.ValidateContainerName(wLRecoveryConfig.RecoveryPoint.ContainerName);

AzureWorkloadSQLRestoreRequest azureWorkloadSQLRestoreRequest =
new AzureWorkloadSQLRestoreRequest();

Expand Down
1 change: 1 addition & 0 deletions src/RecoveryServices/RecoveryServices/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
-->
## Upcoming Release
* Enabled softdelete feature for SQL.
* Fixing SQL AG restore, removing the container name check.

## Version 3.1.0
* Made help text and parameter set name changes to `Restore-AzRecoveryServicesBackupItem` cmdlet.
Expand Down