Skip to content

Commit 02ba1eb

Browse files
Merge pull request #294440 from msangapu-msft/backupDB
Backup db
2 parents 2cdb244 + e7cae8d commit 02ba1eb

File tree

1 file changed

+40
-24
lines changed

1 file changed

+40
-24
lines changed

articles/app-service/manage-backup.md

Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to restore backups of your apps in Azure App Service or c
44
ms.assetid: 6223b6bd-84ec-48df-943f-461d84605694
55
ms.topic: article
66
ms.custom: devx-track-azurecli
7-
ms.date: 09/06/2024
7+
ms.date: 02/10/2025
88
author: msangapu-msft
99
ms.author: msangapu
1010
---
@@ -15,13 +15,6 @@ In [Azure App Service](overview.md), you can easily restore app backups. You can
1515

1616
Back up and restore is supported in the **Basic**, **Standard**, **Premium**, and **Isolated** tiers. For the **Basic** tier, only the production slot can be backed up and restored. For more information about scaling your App Service plan to use a higher tier, see [Scale up an app in Azure](manage-scale-up.md).
1717

18-
> [!NOTE]
19-
> For App Service Environments:
20-
>
21-
> - Automatic backups can be restored to a target app within the App Service Environment itself, not in another App Service Environment.
22-
> - Custom backups can be restored to a target app in another App Service Environment, such as from App Service Environment v2 to App Service Environment v3.
23-
> - Backups can be restored to a target app of the same OS platform as the source app.
24-
2518
[!INCLUDE [backup-restore-vs-disaster-recovery](./includes/backup-restore-disaster-recovery.md)]
2619

2720
## Automatic vs. custom backups
@@ -33,7 +26,7 @@ There are two types of backups in App Service. Automatic backups are created for
3326
| Pricing tiers | **Basic**, **Standard**, **Premium**, **Isolated**. | **Basic**, **Standard**, **Premium**, **Isolated**. |
3427
| Configuration required | No. | Yes. |
3528
| Backup size | 30 GB. | 10 GB, 4 GB of which can be the linked database. |
36-
| Linked database | Not backed up. | The following linked databases can be backed up: [SQL Database](/azure/azure-sql/database/), [Azure Database for MySQL](/azure/mysql/), [Azure Database for PostgreSQL](/azure/postgresql/), [MySQL in-app](https://azure.github.io/AppService/2016/08/18/Announcing-MySQL-in-app-for-Web-Apps-(Windows).html). |
29+
| Linked database | Not backed up. | The following linked databases can be backed up: [SQL Database](/azure/azure-sql/database/), [Azure Database for MySQL](/azure/mysql/), [Azure Database for PostgreSQL](/azure/postgresql/), [MySQL in-app](https://azure.github.io/AppService/2016/08/18/Announcing-MySQL-in-app-for-Web-Apps-(Windows).html). Note that Azure DB for MySQL - **Flexible Server** and Azure DB for PostgreSQL - **Flexible Server** aren't supported in custom backups. |
3730
| [Storage account](../storage/index.yml) required | No. | Yes. |
3831
| Backup frequency | Hourly, not configurable. | Configurable. |
3932
| Retention | 30 days, not configurable. <br>- Days 1-3: hourly backups retained.<br>- Days 4-14: every third hourly backup retained.<br>- Days 15-30: every sixth hourly backup retained. | 0-30 days or indefinite. |
@@ -155,7 +148,15 @@ There are two types of backups in App Service. Automatic backups are created for
155148
156149
1. Configure the backup schedule as desired and then select **Configure**.
157150
158-
#### Back up and restore a linked database
151+
### Back up and restore a linked database
152+
153+
> [!NOTE]
154+
> Custom backups with linked databases for App Service support only **Single Server SKUs** of Azure Database for MySQL and PostgreSQL. Since Single Server SKUs are being retired, upgrading linked databases to **Flexible Server** may cause backups to fail. Use native database backup tools to prevent data loss. Standalone MySQL and PostgreSQL servers (e.g., on VMs) are unaffected by the Single Server SKU retirement. For retirement details, see [MySQL Single Server retirement](/azure/mysql/migrate/whats-happening-to-mysql-single-server.md) and [PostgreSQL Single Server retirement](/azure/postgresql/migrate/whats-happening-to-postgresql-single-server.md).
155+
>
156+
> For back up and restore of Flexible Servers, see the respective database documentation:
157+
>- [Azure Database for MySQL - Flexible Server: Back up and restore](/azure/mysql/flexible-server/concepts-backup-restore).
158+
>- [Azure Database for PostgreSQL - Flexible Server: Back up and restore](/azure/postgresql/flexible-server/concepts-backup-restore).
159+
>
159160
160161
Custom backups can include linked databases (except when the backup is configured over Azure Virtual Network). To make sure your backup includes a linked database, do the following:
161162
@@ -255,6 +256,11 @@ The **Backups** page shows you the status of each backup. To get log details reg
255256
| Missing mandatory parameters for valid Shared Access Signature. | Delete the backup schedule and reconfigure it. |
256257
| SSL connection is required. Specify SSL options and retry when trying to connect. | SSL connectivity to Azure Database for MySQL and Azure Database for PostgreSQL isn't supported for database backups. Use the native backup feature in the respective database instead. |
257258
259+
## How does backup and restore work with App Service Environments?
260+
- Automatic backups can be restored to a target app within the App Service Environment itself, not in another App Service Environment.
261+
- Custom backups can be restored to a target app in another App Service Environment, such as from App Service Environment v2 to App Service Environment v3.
262+
- Backups can be restored to a target app of the same OS platform as the source app.
263+
258264
## Automate with scripts
259265
260266
You can automate backup management with scripts by using [Azure CLI](/cli/azure/install-azure-cli) or [Azure PowerShell](/powershell/azure/).
@@ -282,15 +288,15 @@ For samples, see:
282288
- [Where are the automatic backups stored?](#where-are-the-automatic-backups-stored)
283289
- [How do I stop an automatic backup?](#how-do-i-stop-an-automatic-backup)
284290
285-
#### Are the backups incremental updates or complete backups?
291+
### Are the backups incremental updates or complete backups?
286292
287293
Each backup is a complete offline copy of your app, not an incremental update.
288294
289-
#### Does Azure Functions support automatic backups?
295+
### Does Azure Functions support automatic backups?
290296
291297
Automatic backups are available for Azure Functions in [dedicated (App Service)](../azure-functions/dedicated-plan.md) **Basic**, **Standard**, and **Premium** tiers. Automatic backups aren't supported for function apps in the [**Consumption**](../azure-functions/consumption-plan.md) or [**Elastic Premium**](../azure-functions/functions-premium-plan.md) pricing tiers.
292298
293-
#### What's included in an automatic backup?
299+
### What's included in an automatic backup?
294300
295301
The following table shows which content is backed up in an automatic backup:
296302
@@ -319,29 +325,39 @@ The following table shows which app configurations are restored when you choose
319325
|Associated [deployment slots](deploy-staging-slots.md)| No |
320326
|Any linked database that [custom backup](#whats-included-in-a-custom-backup) supports| No |
321327
322-
#### What's included in a custom backup?
328+
### What's included in a custom backup?
323329
324330
A custom backup (on-demand backup or scheduled backup) includes all content and configuration that's included in an [automatic backup](#whats-included-in-an-automatic-backup), plus any linked database, up to the allowable maximum size.
325331
326332
When [backing up over Azure Virtual Network](#back-up-and-restore-over-azure-virtual-network), you can't [back up the linked database](#back-up-and-restore-a-linked-database).
327333
328-
#### Why is my linked database not backed up?
334+
### Why is my linked database not backed up?
335+
336+
> [!NOTE]
337+
> Custom backups with linked databases for App Service support only **Single Server SKUs** of Azure Database for MySQL and PostgreSQL. Since Single Server SKUs are being retired, upgrading linked databases to **Flexible Server** may cause backups to fail. Use native database backup tools to prevent data loss. Standalone MySQL and PostgreSQL servers (e.g., on VMs) are unaffected by the Single Server SKU retirement. For retirement details, see [MySQL Single Server retirement](/azure/mysql/migrate/whats-happening-to-mysql-single-server.md) and [PostgreSQL Single Server retirement](/azure/postgresql/migrate/whats-happening-to-postgresql-single-server.md).
338+
>
339+
> For back up and restore of Flexible Servers, see the respective database documentation:
340+
>- [Azure Database for MySQL - Flexible Server: Back up and restore](/azure/mysql/flexible-server/concepts-backup-restore).
341+
>- [Azure Database for PostgreSQL - Flexible Server: Back up and restore](/azure/postgresql/flexible-server/concepts-backup-restore).
342+
>
329343
330344
Linked databases are backed up only for custom backups, up to the allowable maximum size. If the maximum backup size (10 GB) or the maximum database size (4 GB) is exceeded, your backup fails. Here are a few common reasons why your linked database isn't backed up:
331345
332-
* Backup of [TLS-enabled Azure Database for MySQL](/azure/mysql/concepts-ssl-connection-security) isn't supported. If a backup is configured, you get backup failures.
333-
* Backup of [TLS-enabled Azure Database for PostgreSQL](/azure/postgresql/concepts-ssl-connection-security) isn't supported. If a backup is configured, you get backup failures.
334-
* In-app MySQL databases are automatically backed up without any configuration. If you make manual settings for in-app MySQL databases, such as adding connection strings, the backups might not work correctly.
346+
- Backup of [TLS-enabled Azure Database for MySQL](/azure/mysql/concepts-ssl-connection-security) isn't supported. If a backup is configured, you get backup failures.
347+
- Backup of [TLS-enabled Azure Database for PostgreSQL](/azure/postgresql/concepts-ssl-connection-security) isn't supported. If a backup is configured, you get backup failures.
348+
- In-app MySQL databases are automatically backed up without any configuration. If you make manual settings for in-app MySQL databases, such as adding connection strings, the backups might not work correctly.
349+
350+
335351
336-
#### What happens if the backup size exceeds the allowable maximum?
352+
### What happens if the backup size exceeds the allowable maximum?
337353
338354
Automatic backups can't be restored if the backup size exceeds the maximum size. Similarly, custom backups fail if the maximum backup size or the maximum database size is exceeded. To reduce your storage size, consider moving files like logs, images, audio, and videos to Azure Storage, for example.
339355
340-
#### Can I use a storage account that has security features enabled?
356+
### Can I use a storage account that has security features enabled?
341357
342358
You can back up to a firewall-protected storage account if it's part of the same virtual network topology as your app. See [Back up and restore over Azure Virtual Network](#back-up-and-restore-over-azure-virtual-network).
343359
344-
#### How do I restore to an app in a different subscription?
360+
### How do I restore to an app in a different subscription?
345361
346362
1. Make a custom backup to an Azure Storage container.
347363
1. [Download the backup ZIP file](../storage/blobs/storage-quickstart-blobs-portal.md) to your local machine.
@@ -352,15 +368,15 @@ You can back up to a firewall-protected storage account if it's part of the same
352368
1. In **Name**, select **Browse** and select the downloaded ZIP file.
353369
1. Configure the rest of the sections as described in [Restore a backup](#restore-a-backup).
354370
355-
#### How do I restore to an app in the same subscription but in a different region?
371+
### How do I restore to an app in the same subscription but in a different region?
356372
357373
The steps are the same as in [How do I restore to an app in a different subscription?](#how-do-i-restore-to-an-app-in-a-different-subscription).
358374
359-
#### Where are the automatic backups stored?
375+
### Where are the automatic backups stored?
360376
361377
Automatic backups are stored in the same datacenter as the App Service. They shouldn't be relied upon as your disaster recovery plan.
362378
363-
#### How do I stop an automatic backup?
379+
### How do I stop an automatic backup?
364380
365381
You can't stop automatic backups. The automatic backup is stored on the platform and has no effect on the underlying app instance or its storage.
366382

0 commit comments

Comments
 (0)