You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/app-service/manage-backup.md
+40-24Lines changed: 40 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Learn how to restore backups of your apps in Azure App Service or c
4
4
ms.assetid: 6223b6bd-84ec-48df-943f-461d84605694
5
5
ms.topic: article
6
6
ms.custom: devx-track-azurecli
7
-
ms.date: 09/06/2024
7
+
ms.date: 02/10/2025
8
8
author: msangapu-msft
9
9
ms.author: msangapu
10
10
---
@@ -15,13 +15,6 @@ In [Azure App Service](overview.md), you can easily restore app backups. You can
15
15
16
16
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).
17
17
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.
| 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. |
| Backup frequency | Hourly, not configurable. | Configurable. |
39
32
| 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
155
148
156
149
1. Configure the backup schedule as desired and then select **Configure**.
157
150
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
+
>
159
160
160
161
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:
161
162
@@ -255,6 +256,11 @@ The **Backups** page shows you the status of each backup. To get log details reg
255
256
| Missing mandatory parameters for valid Shared Access Signature. | Delete the backup schedule and reconfigure it. |
256
257
| 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. |
257
258
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
+
258
264
## Automate with scripts
259
265
260
266
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:
282
288
- [Where are the automatic backups stored?](#where-are-the-automatic-backups-stored)
283
289
- [How do I stop an automatic backup?](#how-do-i-stop-an-automatic-backup)
284
290
285
-
#### Are the backups incremental updates or complete backups?
291
+
### Are the backups incremental updates or complete backups?
286
292
287
293
Each backup is a complete offline copy of your app, not an incremental update.
288
294
289
-
#### Does Azure Functions support automatic backups?
295
+
### Does Azure Functions support automatic backups?
290
296
291
297
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.
292
298
293
-
#### What's included in an automatic backup?
299
+
### What's included in an automatic backup?
294
300
295
301
The following table shows which content is backed up in an automatic backup:
296
302
@@ -319,29 +325,39 @@ The following table shows which app configurations are restored when you choose
319
325
|Associated [deployment slots](deploy-staging-slots.md)| No |
320
326
|Any linked database that [custom backup](#whats-included-in-a-custom-backup) supports| No |
321
327
322
-
#### What's included in a custom backup?
328
+
### What's included in a custom backup?
323
329
324
330
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.
325
331
326
332
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).
327
333
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
+
>
329
343
330
344
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:
331
345
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
+
335
351
336
-
#### What happens if the backup size exceeds the allowable maximum?
352
+
### What happens if the backup size exceeds the allowable maximum?
337
353
338
354
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.
339
355
340
-
#### Can I use a storage account that has security features enabled?
356
+
### Can I use a storage account that has security features enabled?
341
357
342
358
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).
343
359
344
-
#### How do I restore to an app in a different subscription?
360
+
### How do I restore to an app in a different subscription?
345
361
346
362
1. Make a custom backup to an Azure Storage container.
347
363
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
352
368
1. In **Name**, select **Browse** and select the downloaded ZIP file.
353
369
1. Configure the rest of the sections as described in [Restore a backup](#restore-a-backup).
354
370
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?
356
372
357
373
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).
358
374
359
-
#### Where are the automatic backups stored?
375
+
### Where are the automatic backups stored?
360
376
361
377
Automatic backups are stored in the same datacenter as the App Service. They shouldn't be relied upon as your disaster recovery plan.
362
378
363
-
#### How do I stop an automatic backup?
379
+
### How do I stop an automatic backup?
364
380
365
381
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.
0 commit comments