Backup Strategies

RPO, RPA: How to measure RPO compliance of your backups using Powershell

If you work in Disaster Recovery and Business Continuity you will often run across these terms: Recovery Point Objective (RPO) Recovery Point Actual (RPA) Recover Time Objective (RTO) Recovery Time Actual (RTA) In this first article we will explain differences between RPO and RPA and how you can find out if your backups are in

4 minute read

If you work in Disaster Recovery and Business Continuity you will often run across these terms:

  • Recovery Point Objective (RPO)
  • Recovery Point Actual (RPA)
  • Recover Time Objective (RTO)
  • Recovery Time Actual (RTA)

In this first article we will explain differences between RPO and RPA and how you can find out if your backups are in compliance with your RPO using Powershell.

Recovery Point Objective (RPO)

RPO is the maximum data loss an organization can afford to lose in case of a disaster or major IT outage.

If you ask an organization how much data loss they can tolerate in case of a disaster… probably the answer will be zero. When you explain them how much expensive and difficult is to try to achieve a zero RPO for all the IT services then the conversation probably will turn over to define how many hours of data they may afford to lose and defining multiple RPO tiers that will apply to IT services depending on the service and business impact.

RPO is a business specification that dictactes the BC/DR strategy IT have to implement to match the RPO. The lack of business and IT alignment can lead to catastrophic results and serious business impact.

From the point of view of an IT backup admin if RPO for an IT service is set to 24 hours they will probably schedule backups to run every 24 hours or less.

But having an RPO of 24 hours and achieving an RPO of 24 hours are two different things. You won’t know if your backups restore will match your RPO unless you measure it on daily basis and adjust your backup strategy to match it. Many things can go wrong: your last backup can be corrupted, last scheduled backup didnt run or failed, offsite copies are not updated, etc..

So how can I be sure that I am in compliance at anytime? Monitoring your RPA and reporting any deviation between actual and target values.

Recovery Point Actual (RPA)

RPA is a metric that represents the actual amount of data an organization would lose if they had a disaster now and had to restore from a local or offsite backup.

To be in compliance with your RPO policy at any point in time your RPA always must be lower than your RPO.

Unitrends Enterprise Plus provides you reporting on RPO/RTO compliance and actual values, but if you have other Unitrends license you can use a powershell script to see actual RPA values and compliance of your backups at any time.

How to use powershell to get RPA and RPO compliance from your backups

Last week we explained how to create your own powershell cmdlet to interact with Unitrends Appliance, we have extended the sample code Get-UebBackupSummary Cmdlet to also returns current RPA and RPO compliance of your backups based on fixed 24 hours RPO policy.

Cmdlet function:

function Get-UebBackupSummary {
	[CmdletBinding()]
	param(

	)

	CheckConnection
	
	$response = UebGet("api/catalog")
	$instances = $response.catalog.instances
	
	[array]$vmlist = $null
	$date = Get-Date
        $rpo = New-TimeSpan -Hours 24

	foreach($i in $instances){
		$lastbackup = $i.backups | Sort-Object -Property start_date -Descending | Select-Object -First 1
		$backup_date = [datetime] $lastbackup.start_date
		$rpa = New-TimeSpan -Start $backup_date -End $date	
        
        if($rpa -le $rpo) {
            $rpo_compliance = "OK"
        } else {
            $rpo_compliance = "Failed"
        }
            	

		$Object = New-Object PSObject -Property @{ 
			VM = $i.database_name
			Backups = $i.backups.count
			RPO_Compliance = $rpo_compliance
			RPA = "$($rpa.days)d $($rpa.hours)h"
			RPAspan = $rpa
		}

		$vmlist += $Object
	}

	$obj = $vmlist
	$prop = @('VM','RPO_Compliance','RPA','Backups')

	FormatUebResult $obj $prop
}

I have already commited this new version of the cmdlet to Unitrends Powershell Toolkit github repository.

The result output from the cmdlet is a list of protected VMs and their RPA and RPO compliance.

PS> Get-UebBackupSummary
VM                 RPO_Compliance RPA    Backups
--                 -------------- ---    -------
SQLSever01         OK             0d 22h       6
OracleVM01         OK             0d 22h       5
OracleVM02         OK             0d 22h       6
Exchange01         Failed         1d 6h        1
Exchange02         OK             0d 22h       6

You can extend this script or use it in your daily basis to monitor RPO compliance and add mail notifications to have some kind of basic RPO compliance functionality.

I say “basic” because… what would happen if last backup that is in compliance for SQLServer01 is corrupted? You will have to restore from a previous backup and will not be able to match your RPO.

Unitrends Enterprise Plus

Unitrends Enterprise Plus solves this problem providing continuous RPO/RTO Compliance monitoring and Recovery Assurance to be sure your backups are tested and not corrupted and that you are going to be able to recover from them matching your RPO/RTO and without having to maintain any scripts.

See Everything Unitrends Backup Appliances Have to Offer

Appliances range from 2-120TB and are available in high-performance desktop and robust rackmount formfactors. Regardless of the use case, there’s a backup appliance that caters to it.

Request a Demo