Azure Backup Tidbits not easy to find (FAQ)

Q1.†††† How do I know which path to choose for my workload/backup?

Sometimes working with Azure Backup† can be confusing because there are different options to implement depending on the target to be protected/backed up.

The official documentation is found at for the various options that are available.† There are three main targets for backup at this time.† They are:

  • Windows machines
  • Application Workloads
  • Azure Virtual Machines.

The documentation is very clear on this so below you will find the correct option to choose for each target.

  1. Windows machines On the Quick Start page, click Agent for Windows Server or System Center Data Protection Manager or Windows Client
  2. Application Workloads For Application Workloads (Disk to Disk to Cloud) If you have DPM licensing choose the DPM tab otherwise use this one.
  3. Azure Virtual Machines† Prepare your environment to back up Azure virtual machines

Q2.†††† At this time, there are no built in Azure Backup Vault Reports that sends out an email.† Is there a way to do it?

  • There is a PowerShell script.† It is:

//Script by De Jager Laubscher from azure-backup-and-scdpm/suggestions/6531898-email-notification-alerts-for-azure-backup

Import-module Azure
$MyAzureName = “”;
$MyAzurePassword = ConvertTo-SecureString ‘YourPasswordHere’ -AsPlainText -Force;
$AzureRMCredential = new-object -typename System.Management.Automation.PSCredential -argumentlist $MyAzureName, $MyAzurePassword
Add-AzureRMAccount -Credential $AzureRMCredential
Switch-AzureMode AzureResourceManager


# Set the backup vault name and number of days you want to report Backups for
$backupvaultname = “Your Vault Name”
$numberofdays = 2

#Initialize variables
$backupvault = Get-AzureRMBackupVault -Name $backupvaultname
$enddate = ([datetime]::Today).AddDays(1)
$startdate = ([datetime]::Today)

$smtpServer = “IP of your SMTP Server”
$smtpFrom = “”
$smtpTo = “”
$messageSubject = “Azure Backup Vault Report”
$message = New-Object System.Net.Mail.MailMessage $smtpfrom, $smtpto
$message.Subject = $messageSubject
$message.IsBodyHTML = $True

for( $i = 1; $i -le $numberofdays; $i++ )
# We query one day at a time because pulling 2 days of data might be too much
$dailyjoblist = Get-AzureRMBackupJob -Vault $backupvault -From $startdate -To $enddate -Type AzureVM -Operation Backup
Write-Progress -Activity “Getting job information for the last $numberofdays days” -Status “Day -$i” -PercentComplete ([int]([decimal]$i*100/$numberofdays))

foreach( $job in $dailyjoblist )
#Extract the information for the reports

$message.Body =
$newstatsobj = New-Object System.Object
$newstatsobj | Add-Member -type NoteProperty -name Date -value $startdate
$newstatsobj | Add-Member -type NoteProperty -name VMName -value $job.WorkloadName
$newstatsobj | Add-Member -type NoteProperty -name Duration -value $job.Duration
$newstatsobj | Add-Member -type NoteProperty -name Status -value $job.Status

$details = Get-AzureRMBackupJobDetails -Job $job
$newstatsobj | Add-Member -type NoteProperty -name BackupSize -value $details.Properties[“Backup Size”]
$DAILYBACKUPSTATS += $newstatsobj

$enddate = $enddate.AddDays(-1)
$startdate = $startdate.AddDays(-1)

#Sets the column
$a = “<style>”
$a = $a + “BODY{background-color:white;}”
$a = $a + “TABLE{border-width: 1px;border-style: solid;border-color: Purple;border-collapse: collapse;}”
$a = $a + “TH{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:LightSeaGreen}”
$a = $a + “TD{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:WhiteSmoke}”
$a = $a + “</style>”


$message.Body = $DAILYBACKUPSTATS | ConvertTo-Html -Head $a
$smtp = New-Object Net.Mail.SmtpClient($smtpServer)

Q3.† Where does the MARS Agent write log files to?

C:\Program Files\Microsoft Azure Recovery Services Agent\Temp

Q4.† How would I enable verbose logging for debugging?

Run these commands from an elevated command prompt-

reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Azure Backup”† /f /t REG_DWORD /v TraceLogLevel /d 1535

net stop obengine

net start obengine

and look for verbose logs in (ie C:\Program Files\Microsoft Azure Recovery Services Agent\Temp).

Q5.† In regard to backing up Azure VMs I canít see my VMs when I try the discovery mode?

When you create a Backup Vault always select the region for the vault that your infrastructure is located in.† This is a key factor.† When you choose the discovery option to find your servers it will only look in the Data Center where the Vault is created.

Leave a Reply