Skip to content

Commit 9216162

Browse files
Merge pull request #49663 from JulianePadrao/update-backup-restore-databases
Updates to backup-restore-databases
2 parents beece71 + fca76f8 commit 9216162

13 files changed

+42
-46
lines changed

learn-pr/wwl-data-ai/backup-restore-databases/1-introduction.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ metadata:
66
prefetch-feature-rollout: true
77
title: Introduction
88
description: "Introduction"
9-
ms.date: 07/25/2023
10-
author: wwlpublish
9+
ms.date: 03/25/2025
10+
author: JulianePadrao
1111
ms.author: jupadrao
1212
ms.topic: unit
1313
azureSandbox: false

learn-pr/wwl-data-ai/backup-restore-databases/2-backup-restore-sql-server-running-azure-virtual-machines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ metadata:
66
prefetch-feature-rollout: true
77
title: Back up and restore SQL Server running on Azure virtual machines
88
description: "Back up and restore SQL Server running on Azure virtual machines"
9-
ms.date: 07/25/2023
10-
author: wwlpublish
9+
ms.date: 03/25/2025
10+
author: JulianePadrao
1111
ms.author: jupadrao
1212
ms.topic: unit
1313
azureSandbox: false

learn-pr/wwl-data-ai/backup-restore-databases/3-backup-sql-server-virtual-machine.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ metadata:
66
prefetch-feature-rollout: true
77
title: Back up a SQL Server virtual machine
88
description: "Back up a SQL Server virtual machine"
9-
ms.date: 07/25/2023
10-
author: wwlpublish
9+
ms.date: 03/25/2025
10+
author: JulianePadrao
1111
ms.author: jupadrao
1212
ms.topic: unit
1313
azureSandbox: false

learn-pr/wwl-data-ai/backup-restore-databases/4-use-azure-sql-database.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
### YamlMime:ModuleUnit
22
uid: learn.wwl.backup-restore-databases.backup-restore-database-using-azure-sql-database
3-
title: Back up and restore a database using Azure SQL Database
3+
title: Back up and restore a database for SQL Database and SQL Managed Instance
44
metadata:
55
adobe-target: true
66
prefetch-feature-rollout: true
7-
title: Back up and restore a database using Azure SQL Database
8-
description: "Back up and restore a database using Azure SQL Database"
9-
ms.date: 07/25/2023
10-
author: wwlpublish
7+
title: Back up and restore a database for SQL Database and SQL Managed Instance
8+
description: "Back up and restore a database SQL Database and SQL Managed Instance"
9+
ms.date: 03/25/2025
10+
author: JulianePadrao
1111
ms.author: jupadrao
1212
ms.topic: unit
1313
azureSandbox: false

learn-pr/wwl-data-ai/backup-restore-databases/5-exercise-backup-url.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ metadata:
66
prefetch-feature-rollout: true
77
title: 'Exercise: Backup to URL'
88
description: "Exercise: Backup to URL"
9-
ms.date: 07/25/2023
10-
author: wwlpublish
9+
ms.date: 03/25/2025
10+
author: JulianePadrao
1111
ms.author: jupadrao
1212
ms.topic: unit
1313
azureSandbox: false

learn-pr/wwl-data-ai/backup-restore-databases/6-knowledge-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ metadata:
66
prefetch-feature-rollout: true
77
title: Knowledge check
88
description: "Knowledge check"
9-
ms.date: 07/25/2023
10-
author: wwlpublish
9+
ms.date: 03/25/2025
10+
author: JulianePadrao
1111
ms.author: jupadrao
1212
ms.topic: unit
1313
azureSandbox: false

learn-pr/wwl-data-ai/backup-restore-databases/7-summary.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ metadata:
66
prefetch-feature-rollout: true
77
title: Summary
88
description: "Summary"
9-
ms.date: 07/25/2023
10-
author: wwlpublish
9+
ms.date: 03/25/2025
10+
author: JulianePadrao
1111
ms.author: jupadrao
1212
ms.topic: unit
1313
azureSandbox: false
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
Even if you do nothing else to increase your availability with features like AGs or active geo-replication, you must have a solid backup and recovery strategy. If for some reason a feature fails, you'll have to restore databases from backups.
1+
Planning and implementing a robust policy for data recovery is essential to mitigate the risks associated with user errors or technology failures. This involves exploring various options for backing up and restoring databases, including on-site and off-site solutions, cloud-based services, and automated backup systems. By understanding the different methods for data back up and recovery, organizations can safeguard their critical information and maintain operational continuity in the face of unforeseen challenges.
22

3-
## Learning objectives
4-
5-
In this module, you'll learn:
6-
7-
- Database backup and restore options for IaaS
8-
- Virtual machine backup and restore options for IaaS
9-
- Backup and restore options for PaaS
3+
Even if you do nothing else to increase your availability with features like AGs or active geo-replication, you must have a solid backup and recovery strategy.

learn-pr/wwl-data-ai/backup-restore-databases/includes/3-backup-sql-server-virtual-machine.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
Azure Backup can back up VMs that contain SQL Server. These backups would contain not just SQL Server databases; they would contain everything that is in the VM so it could be restored as a whole. While this option may not be right for everyone, it can potentially protect against problems like ransomware.
1+
Azure Backup offers the capability to back up virtual machines (VMs) that host SQL Server. These backups contain not only the SQL Server databases but also all other contents within the VM, allowing for a complete restoration if needed. Although this approach may not be suitable for every scenario, it provides a robust safeguard against issues such as ransomware attacks.
22

3-
VM-level backups are SQL Server-aware, also known as application aware, so they'll create an application-consistent backup. This means that if you restore a VM-level backup, it will not ‘break’ SQL Server. If using this option, when looking in the SQL Server log you'll see that the I/O has been momentarily frozen and then starts again when complete. If this causes issues with availability features like AGs, you may want to consider another backup strategy.
3+
VM-level backups are SQL Server-aware, also known as application-aware, ensuring the creation of application-consistent backups. This means that restoring a VM-level backup won't disrupt SQL Server functionality. When using this option, the SQL Server log indicates that the I/O has been momentarily frozen and then resumed upon completion.
44

5-
Combining SQL Server backups with snapshots can potentially cause issues. If snapshot delays cause backup failures, set following registry key:
5+
Combining SQL Server backups with snapshots can potentially cause issues. If snapshot delays cause backup failures, set following value on the `[HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\BCDRAGENT]` key:
66

7-
[HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\BCDRAGENT]
8-
9-
"USEVSSCOPYBACKUP"="TRUE"
7+
**"USEVSSCOPYBACKUP"**="TRUE"
108

119
## Use local disks or a network share for backup files
1210

@@ -16,11 +14,11 @@ As with on premises SQL Server instances, databases can be backed up to disks at
1614

1715
Another option is to configure backup to URL for the SQL Server instance installed in the VM. Unlike backups made on premises, backup and restore from URL for an IaaS VM is effectively a local option.
1816

19-
Backup to URL requires an Azure storage account and uses the Azure blob storage service. Inside the storage account, there are containers, and the blobs are stored there. Unlike a path on your local disk, the path to a backup file will look something like `https://ACCOUNTNAME.blob.core.windows.net/ContainerName/MyDatabase.bak`. You can include more folder names under your container for easier identification of backups (for example, FULL, DIFF, LOG).
17+
Back up to URL requires an Azure storage account and uses the Azure blob storage service. Inside the storage account, there are containers, and the blobs are stored there. Unlike a path on your local disk, the path to a backup file looks something like `https://ACCOUNTNAME.blob.core.windows.net/ContainerName/MyDatabase.bak`. You can include more folder names under your container for easier identification of backups (for example, FULL, DIFF, LOG).
2018

21-
To backup to or restore from a URL, authentication must be established between the SQL Server instance and Azure. Remember that inside of an Azure VM, SQL Server doesn't know it's running on Azure. A SQL Server Credential can be composed of the Azure storage account name and access key authentication or a Shared Access Signature. If the former is used, the backup will be stored as a page blob and if the latter, it will be stored as a block blob. Starting with SQL Server 2016, only block blob is available so you should use a Shared Access Signature. From a cost perspective, block blobs are also cheaper, and Shared Access Signature tokens offer better security control.
19+
To back up to or restore from a URL, authentication must be established between the SQL Server instance and Azure. Remember that inside of an Azure VM, SQL Server doesn't know it's running on Azure. A SQL Server Credential can be composed of the Azure storage account name and access key authentication or a Shared Access Signature. If the former is used, the backup is stored as a page blob and if the latter, it's stored as a block blob. Starting with SQL Server 2016, only block blob is available so you should use a Shared Access Signature. From a cost perspective, block blobs are also cheaper, and Shared Access Signature tokens offer better security control.
2220

23-
Restoring from a URL is as simple as restoring from disk or a network share. In the SQL Server Management Studio UI, select URL from the backup media type in the Wizard. If using Transact-SQL, instead of using FROM DISK, you would use FROM URL with the appropriate location and backup file name(s). Here are some sample statements:
21+
Restoring from a URL is as simple as restoring from disk or a network share. In the SQL Server Management Studio UI, select URL from the backup media type in the Wizard. If using Transact-SQL, instead of using FROM DISK, you would use FROM URL with the appropriate location and backup file name. Here are some sample statements:
2422

2523
The following statement would back up a transaction log.
2624

@@ -41,13 +39,13 @@ WITH NORECOVERY
4139

4240
Any IaaS VM that has SQL Server installed can use the SQL Server resource provider. One of its options is the ability to configure automated backups so Azure takes care of backing up SQL Server databases. It requires the use of a storage account.
4341

44-
One benefit of implementing backups this way is that you can manage retention times for the backups. Another benefit is that you can ensure RPO due to the ability to take database and transaction log backups all in one easy-to-configure place. The image below shows an example of what configuring an automated backup looks like in the Azure portal.
42+
One benefit of implementing backups this way is that you can manage retention times for the backups. Another benefit is that you can ensure RPO due to the ability to take database and transaction log backups all in one easy-to-configure place. The following image shows an example of what configuring an automated backup looks like in the Azure portal.
4543

4644
:::image type="content" source="../media/module-77-high-availability-final-15.png" alt-text="Configuring automated backups for SQL Server in a VM in the Azure portal":::
4745

4846
The automated backup option is currently only available for Windows Server-based SQL Server installations.
4947

5048
> [!IMPORTANT]
51-
> You choose one method of backing up databases with IaaS-based SQL Server deployments. For example, if you use automated backups, especially with transaction log backups, do not also configure those at the instance level inside the VM. You could cause problems with the log chain with restoring a database if things are uncoordinated, because each log backup clears the log and you must have an entire unbroken chain of log backups in order to do a log restore. For example, if transaction log backups happen inside the guest as well as at the Azure level, you may have to piece together the backups to do a restore.
49+
> You choose one method of backing up databases with IaaS-based SQL Server deployments. For example, if you use automated backups, especially with transaction log backups, don't also configure those at the instance level inside the VM. You could cause problems with the log chain with restoring a database if things are uncoordinated, because each log backup clears the log and you must have an entire unbroken chain of log backups in order to do a log restore. For example, if transaction log backups happen inside the guest and at the Azure level, you may have to piece together the backups to do a restore.
5250
5351
While the backups can be automated, restores can't be. You would need to configure and use the restore from URL functionality within SQL Server.

learn-pr/wwl-data-ai/backup-restore-databases/includes/4-use-azure-sql-database.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,40 @@
11

2-
Back up and restore on SQL Server PaaS offering work differently than on IaaS. Backups are generated automatically for Azure SQL Database, and Azure SQL Managed Instance. A full backup is created once a week, a differential every 12 hours, and transaction log backups every 5 10 minutes. All backups are located in read-access, geo-redundant (RA-GRS) blobs replicated to a datacenter that is paired based on Azure rules. That means backups are safe from an outage in a single data center.
2+
Back up and restore on SQL Server PaaS offering work differently than on IaaS. Backups are generated automatically for Azure SQL Database, and Azure SQL Managed Instance. A full backup is created once a week, a differential every 12 hours, and transaction log backups every 5 to 10 minutes. All backups are located in read-access, geo-redundant (RA-GRS) blobs replicated to a datacenter that is paired based on Azure rules. That means backups are safe from an outage in a single data center.
33

44
## Database backup and restore for SQL Database
55

6-
SQL Database can assist you to be compliant with mandatory backups for regulatory purposes with retention policies. Backup policies can be configured per database as shown in the image below:
6+
Database backups are an essential part of any business continuity and disaster recovery strategy because they help protect your data from corruption or deletion.
7+
8+
SQL Database can assist you to be compliant with mandatory backups for regulatory purposes with retention policies. Backup policies can be configured per database as shown in the following image:
79

810
:::image type="content" source="../media/module-77-high-availability-final-16.png" alt-text="Configuring automated backups for Azure SQL Database":::
911

10-
If the server containing the database is deleted, all backups will be deleted at the same time, and there's no way to recover them. If the server isn't deleted but the database is, you can restore the database normally.
12+
If the server containing the database is deleted, all backups are deleted at the same time, and there's no way to recover them. If the server isn't deleted but the database is, you can restore the database normally.
1113

1214
Both SQL Database, and SQL Managed Instance have a feature called Accelerated Database Recovery (ADR). This feature is enabled by default, and its purpose is to decrease the time it takes to deal with long running transactions so they don't affect the recovery time. Although Accelerated Database Recovery was developed for Azure and was originally an Azure-based feature, ADR was implemented in SQL Server 2019 as well.
1315

1416
> [!NOTE]
15-
> You can't restore SQL Database Managed Instance backups on SQL Database.
17+
> You can't restore SQL Database Azure SQL Managed Instance backups on SQL Database.
18+
19+
Automated database backups are also avaialable on [Azure SQL Managed Instance](/azure/azure-sql/managed-instance/automated-backups-overview). SQL Server database engine backups are automatically managed by Microsoft, and stored on Microsoft-managed Azure storage accounts.
1620

1721
### Point in time restore
1822

1923
To restore a database to a specific point in time on SQL Database, you can use either Azure portal, Azure PowerShell, Azure CLI, or REST API.
2024

2125
> [![Restoring a database on SQL Database through Azure portal](../media/restore-sql-database.png)](../media/restore-sql-database.png#lightbox)
2226
23-
The image above shows the SQL Database restore page on Azure portal, where you can restore a database to a specific point in time.
27+
The following image shows the SQL Database restore page on Azure portal, where you can restore a database to a specific point in time.
2428

2529
Restore in place isn't supported on SQL Database, and SQL Managed Instance. You need to make sure the database doesn't exist before attempting the restore operation. By default, point in time retention policy is set to seven days, and you can change it to up to 35-days.
2630

2731
### Restore a deleted database
2832

29-
Both SQL Database, and SQL Managed Instance have a feature to restore a deleted database to the last point in time available before the `DROP DATABASE` took place.
33+
Both SQL Database, and SQL Managed Instance have a feature to restore a deleted database to the last point in time available before the `DROP DATABASE` took place. To recover a deleted database to the deletion time by using the Azure portal, open the server's overview page and select **Deleted databases**. Select a deleted database that you want to restore, and then enter the name for the new database that will be created with data restored from the backup.
3034

3135
> [![Restoring a deleted database on SQL Database through Azure portal](../media/restore-sql-database-deleted.png)](../media/restore-sql-database-deleted.png#lightbox)
3236
33-
The image above shows how to restore a deleted database on SQL Database. The *deleted databases* page shows a list of deleted databases available to restore, the database deletion time in UTC, and the database creation time in UTC. Once you select the database, the *Create SQL Database - Restore database* page will open. On that page you'll find the earliest restore point in time available for the selected database.
37+
The image shows how to restore a deleted database on SQL Database. The *deleted databases* page shows a list of deleted databases available to restore, the database deletion time in UTC, and the database creation time in UTC. Once you select the database, the *Create SQL Database - Restore database* page opens. On that page you find the earliest restore point in time available for the selected database.
3438

3539
## Database backup and restore for SQL Managed Instance
3640

@@ -47,4 +51,4 @@ WITH COPY_ONLY
4751
```
4852

4953
> [!NOTE]
50-
> You can't restore SQL Database Managed Instance backups on SQL Database.
54+
> You can't restore SQL Database SQL Managed Instance backups on SQL Database.

0 commit comments

Comments
 (0)