If you need to recover from a complete Azure Stack data loss due to a disaster, it's critical to be able to restore EvOps after Azure Stack restoration. This article will describe what you need to back up from an EvOps perspective.
EvOps Backup
If you have enabled backup for Azure Stack, the only additional data that you need to back up is the EvOps resource provider storage account. Since other dependent artifacts like Subscriptions, Resource Groups, and Key Vaults, are covered by the Azure Stack recovery process and will not be covered by the EvOps backup.
As Storage accounts are not backed up by Azure Stack backup, these will be needed to be configured for backup separately. Third-party backup solutions for backup storage accounts are available, but in this article, we will be generic and use AzCopy to export and import data.
Backup Checklist
- Azure Stack Backup Enabled
- Backup-EvOpsStorage Script Configured and Scheduled
- Backup Destination Targeted by Scheduled Backup
It's recommended to schedule backups at least daily.
EvOps Storage Account Backup Script
Since the backup script uses AzCopy, a server or client running Windows needs to be hosting the script. In the instruction below we will reference this as the host.
- Log in into the host as an administrator
- Install AzCopy on the host, if already installed verify that the exact version 7.3.0 is installed to ensure that it supports table storage. If you have an earlier version, please upgrade. Read more and download AzCopy for Windows here
WARNING
Newer versions of AzCopy don't support table storage, make sure you install exact AzCopy version 7.3.0. use download link above. (version 7.3.1 doesn't currently support Azure Stack)
- Open Azure Stack tenant portal and go to the resource group where the EvOps infrastructure is deployed. Look for a resource group with the following naming standard:
system.<Location>.evops - In resource group, click Resources and open the storage account with name starting with:
evopsrp... - Click Access keys and copy Connection String
- Download EvOpsStorageTools.zip from this article
- Extract EvOpsStorageTools.zip. In this article we will extract to: C:\Backup
- Open a PowerShell prompt as Administrator
- Change current directory to C:\Backup
- Execute code below to export but replace variables to your environment. For explanation and samples see table:
.\Backup-EvOpsStorage.ps1 -ConnectionString "<ConnectionString>" -Destination "<OutputPath>"
- <ConnectionString>
- EvOps RP Storage Account Connection string that was copied in step 5.
- <Destination>
- Path where backup file should be saved. Location should be targeted by an backup solution with a schedule that is synced with the script execution. Example path formats: C:\EvOpsBackup\ or \\filesrv1\EvOpsBackup\
- When script has executed successfully a zip with a generated filename has been created in the path you defined using the Destination parameter
- This script should then be added as a scheduled task or scheduled for execution by an automation tool
IMPORTANT
This backup script should be scheduled to be executed in the same interval as the Azure Stack backup schedule. Backup destination folder must be targeted by a backup solution and recommended best practice is that script execution health should be monitored.
Recover from a disaster
To be able to restore EvOps after a disaster you need to make sure that:
Recovery Prerequisites Checklist
- Azure Stack recovery has been performed successfully
- Subscription and resource group containing EvOps infrastructure has been recovered as a part of the Azure Stack recovery
- EvOps KeyVault (incl. secrets) has been recovered as a part of the Azure Stack recovery
- Valid EvOps backup from before disaster occurred
- Baseline version of EvOps installation media available e.g. version of EvOps installed when disaster occurred
Start EvOps recovery
Perform the following steps to recovery from a disaster:
- Follow instructions in the EvOps Deployment Guide until the step when editing the Install-EvOps.ps1 script
- In addition to the steps outlined in the the deployment guide, you need to add the switch called -CloudRecovery as below:
.\scripts\Deploy-EvOps.ps1 -TenantSubscriptionId $tenantSubscriptionId ` -PrivilegedEndpoint $privilegedEndpoint -CloudRecovery
- Continue with the following instructions in the EvOps Deployment Guide
- Wait for installation to complete
- Open Azure Stack tenant portal and go to the resource group where the EvOps infrastructure was deployed. Look for a resource group with the following naming standard:
system.<Location>.evops - In resource group, click Resources and open the storage account with name starting with:
evopsrp... - Click Access keys and copy Connection String
- Download EvOpsStorageTools.zip from this article
- Extract EvOpsStorageTools.zip. In this article we will extract to: C:\Backup
- Open a PowerShell prompt as Administrator
- Change current directory to C:\Backup
- Execute code below to export, but replace variables to your environment. For explanation and samples see table:
.\Restore-EvOpsStorage.ps1 -ConnectionString "<ConnectionString>" -BackupPath "<BackupFile>"
- <ConnectionString>
- EvOps RP Storage Account Connection string that was copied in step 7.
- <BackupFile>
- Full path including file name to backup file that should be used for restore. Example path formats: C:\EvOpsBackup\636832318082564125.zip or \\filesrv1\EvOpsBackup\636832318082564125.zip
- Go to Azure Stack admin portal and add EvOps services to all Plans where they were available prior to disaster
- Open a new browser window
- Open Azure Stack admin portal using the "EvOpsExtensionAdmin_rehydration" parameter in the URL as below (passing the parameter enables re-hydration options in the UI):
https://adminportal.local.azurestack.external/?EvOpsExtensionAdmin_rehydration=true
- Go to EvOps and click Restore resources to initiate recovery
- Within a few hours all resources should be recovered
- Restore completed
Comments
0 comments
Article is closed for comments.