简体   繁体   English

具有自动备份功能的Azure Analytics数据库

[英]Azure Analytics Database with automate Backup

The powershell is used to automate the backup of AAS instance. Powershell用于自动备份AAS实例。 The instance have Multi-factor authentication and I think that is the problem. 该实例具有多因素身份验证,我认为这就是问题所在。

在此处输入图片说明

Powershell: 电源外壳:

 $TenantId = "TenentID"  
 $Cred = Get-AutomationPSCredential -Name 'SSASModelBackup'
 $Server = "ServerName" 
 $RolloutEnvironment = "location.asazure.windows.net" 
 $ResourceGroup = "ReourceGroupName"

 #Create Credentials to convertToSecureString
 $applicationId = "applicationId " 
 $securePassword = "securePassword " | ConvertTo-SecureString -AsPlainText -Force $Credential = New-Object
-TypeName System.Management.Automation.PSCredential -ArgumentList $applicationId, $securePassword



#Define the list of AAS databases  
$asDBs = @('database1','database2') 
Write-Output "Logging in to Azure..."   

#Add-AzureAnalysisServicesAccount -Credential $Credential -ServicePrincipal -TenantId $TenantId -RolloutEnvironment $RolloutEnvironment
ForEach($db in $asDBs)
 {
  Write-Output "Starting Backup..."
   Backup-ASDatabase `
  –backupfile ($db +"." + (Get-Date).ToString("ddMMyyyy") + ".abf") `
  –name $db `
  -server $Server `
  -Credential $Cred
  Write-Output "Backup Completed!" 
 }

You are correct that the issue is with multi-factor authentication. 您的问题是多因素身份验证是正确的。 Since the point of multi-factor is the require interaction with a secondary source like your phone there is no way to automate the process. 由于多重因素的关键是需要与诸如手机之类的次要来源进行交互,因此无法自动执行该过程。

I would suggest that you look into using service principle authentication for the purpose of taking backups. 我建议您考虑使用服务原理身份验证来进行备份。 By using a service principle to your server you can allow for automated tasks to run without 2-factor while minimizing the security risk. 通过对服务器使用服务原则,您可以使自动化任务在没有两方面因素的情况下运行,同时最大程度地降低了安全风险。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM