0
0
Azurecloud~30 mins

Database backup and geo-replication in Azure - Mini Project: Build & Apply

Choose your learning style9 modes available
Database backup and geo-replication
📖 Scenario: You are managing a cloud database for a global company. To ensure data safety and availability, you need to set up automatic backups and geo-replication to another region.
🎯 Goal: Build an Azure SQL Database resource with automated backups enabled and configure geo-replication to a secondary region.
📋 What You'll Learn
Create an Azure SQL Server resource with a specific name and location
Create an Azure SQL Database on the server with a defined edition and compute size
Enable automated backups with a retention period of 7 days
Configure geo-replication to a secondary region
💡 Why This Matters
🌍 Real World
Cloud databases need backups and geo-replication to protect data and ensure availability across regions.
💼 Career
Database administrators and cloud engineers often configure backups and geo-replication to meet business continuity requirements.
Progress0 / 4 steps
1
Create Azure SQL Server resource
Create an Azure SQL Server resource with the name myserver123 in the eastus region. Use myadmin as the administrator login and MyP@ssword123 as the administrator password.
Azure
Need a hint?

Use the azurerm_sql_server resource with the specified properties.

2
Create Azure SQL Database with backup retention
Create an Azure SQL Database named mydatabase on the server myserver123 with the edition Standard and compute size S1. Set the backup retention period to 7 days.
Azure
Need a hint?

Use azurerm_sql_database resource and set backup_retention_days to 7.

3
Configure geo-replication to secondary region
Create a secondary Azure SQL Database named mydatabase-secondary in the westus region for geo-replication of the primary database mydatabase.
Azure
Need a hint?

Use create_mode = "Secondary" and source_database_id to link the geo-replica.

4
Finalize resource group and output server names
Add an output named primary_server_name that outputs the name of the primary SQL server myserver123. Also add an output named secondary_database_name that outputs the name of the secondary database mydatabase-secondary.
Azure
Need a hint?

Use output blocks with value set to the resource names.