Azure Site Recovery

 It is a disaster recovery solution that replicates on-premises Windows Servers to the Azure cloud. It supports high availability and provides automatic failover in the event of a disaster. ASR is ideal for creating geo-replicated setups for Windows Servers and databases, ensuring minimal data loss and downtime. 



#Setting Up Azure Site Recovery for On-Premises Servers 


*Step 1: Prepare the Azure Environment 

Create a Recovery Services Vault: Log in to the Azure portal and navigate to Recovery Services Vaults. Create a new vault in the region where you want to replicate data. 

Enable Replication: Once the vault is created, go to Settings > Site Recovery Infrastructure and select Prepare Infrastructure. 

 

*Step 2: Install the ASR Provider on the On-Premises Server 

Download the ASR Provider: In the Azure portal, under your Recovery Services Vault, go to Site Recovery Infrastructure > Resources > Download Site Recovery Provider. 

Install on Primary Domain Controller (PDC): Run the downloaded provider setup on your PDC to establish a connection between your on-premises environment and Azure. 

Register with the Vault: During installation, you will be prompted to register the server with your Recovery Services Vault. Use the vault credentials generated from Azure. 

 

#Configuring Database Replication with ASR 

 

*Step 3: Select the Replication Goal 

Define Replication Goal: Go to Recovery Services Vault > Site Recovery and select + Replicate Application. Choose Source as your on-premises environment and Target as Azure. 

Select Replication Appliance: Choose the ASR Provider installed on your server and select the server where your database resides. 

*Step 4: Enable Database Consistency 

Application-Aware Processing: For SQL Server databases, enable application-aware processing for transaction consistency. This ensures data integrity during replication by taking database snapshots. 

 

#Set Up Replication Policies and Failover Options 

 

*Step 5: Define Replication Policy 

Create a Replication Policy: Go to Recovery Services Vault > Site Recovery and create a new replication policy specifying RPO (Recovery Point Objective) and Retention Period. Define how frequently recovery points are created. 

Apply the Policy: Associate this policy with your on-premises server. 

 

*Step 6: Set Up Failover Strategies 

Choose Failover Option: Define whether you want to set up automatic failover or manual. For critical applications, automatic failover is recommended to reduce downtime. 

 

#Testing and Verifying Replication 

 

*Step 7: Test Failover 

Run a Test Failover: Select Test Failover in the Azure portal to create a virtual machine (VM) in Azure using the replicated data. This process validates the setup without affecting the live environment. 

Check Application Availability: Ensure the replicated server and databases function correctly in the Azure VM. 

 

*Step 8: Run a Full Failover 

Full Failover in Production: When ready, select Failover to initiate a full failover to the replicated instance in Azure. After failover, make the Azure instance your primary server.