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
| Restore a database from a point in time |[SQL Database](recovery-using-backups.md#point-in-time-restore)|[SQL Database](https://docs.microsoft.com/powershell/module/az.sql/restore-azsqldatabase) <br/> [SQL Managed Instance](https://docs.microsoft.com/powershell/module/az.sql/restore-azsqlinstancedatabase)|
| Restore a database from a point in time |[Single database](recovery-using-backups.md#point-in-time-restore)|[Single database](https://docs.microsoft.com/powershell/module/az.sql/restore-azsqldatabase) <br/> [Managed instance](https://docs.microsoft.com/powershell/module/az.sql/restore-azsqlinstancedatabase)|
SQL Database and SQL Managed Instance support self-service for point-in-time restore (PITR) by automatically creating full backups, differential backups, and transaction log backups. Full database backups are created weekly, and differential database backups are generally created every 12 hours. Transaction log backups are generally created every 5 to 10 minutes. The frequency of transaction log backups is based on the compute size and the amount of database activity.
57
57
58
-
The first full backup is scheduled immediately after a database is created. This backup usually completes within 30 minutes, but it can take longer when the database is large. For example, the initial backup can take longer on a restored database or a database copy. After the first full backup, all further backups are scheduled automatically and managed silently in the background. The exact timing of all database backups is determined by SQL Database and SQL Managed Instance as it balances the overall system workload. You can't change or disable the backup jobs.
58
+
The first full backup is scheduled immediately after a database is created. This backup usually completes within 30 minutes, but it can take longer when the database is large. For example, the initial backup can take longer on a restored database or a database copy. After the first full backup, all further backups are scheduled automatically and managed silently in the background. The exact timing of all database backups is determined by the SQL Database or SQL Managed Instance service as it balances the overall system workload. You can't change or disable the backup jobs.
59
59
60
60
### Default backup retention period
61
61
@@ -73,20 +73,20 @@ For more information about LTR, see [Long-term backup retention](long-term-reten
73
73
74
74
## Backup storage consumption
75
75
76
-
For single databases in SQL Database and managed instances in SQL Managed Instance, this equation is used to calculate the total backup storage usage:
76
+
For single databases and managed instances, this equation is used to calculate the total backup storage usage:
77
77
78
78
`Total backup storage size = (size of full backups + size of differential backups + size of log backups) – database size`
79
79
80
-
For pooled databases in SQL Database, the total backup storage size is aggregated at the pool level and is calculated as follows:
80
+
For pooled databases, the total backup storage size is aggregated at the pool level and is calculated as follows:
81
81
82
82
`Total backup storage size = (total size of all full backups + total size of all differential backups + total size of all log backups) - allocated pool data storage`
83
83
84
84
Backups that occur before the retention period are automatically purged based on their timestamp. Because differential backups and log backups require an earlier full backup to be useful, they're purged together in weekly chunks.
85
85
86
86
SQL Database and SQL Managed Instance compute your total in-retention backup storage as a cumulative value. Every hour, this value is reported to the Azure billing pipeline, which is responsible for aggregating this hourly usage to calculate your consumption at the end of each month. After the database is dropped, consumption decreases as backups age. After backups become older than the retention period, billing stops.
87
-
87
+
88
88
> [!IMPORTANT]
89
-
> Backups of a database are retained for the specified retention period, even if the database has been dropped. While dropping and re-creating a database can frequently save on storage and compute costs, it might increase backup storage costs because Microsoft retains a backup for the specified retention period for each dropped database, every time it's dropped.
89
+
> Backups of a database are retained for the specified retention period, even if the database has been dropped. While dropping and re-creating a database can frequently save on storage and compute costs, it might increase backup storage costs because Microsoft retains a backup for the specified retention period for each dropped database, every time it's dropped.
90
90
91
91
### Monitor consumption
92
92
@@ -136,18 +136,21 @@ Add a filter for **Service name**, and then select **sql database** in the drop-
136
136
137
137
## Backup retention
138
138
139
-
All databases in Microsoft Azure SQL have a default backup retention period of 7 days. You can [change the backup retention period](#change-the-pitr-backup-retention-period) to as long as 35 days.
139
+
All databases in Microsoft Azure SQL have a default backup retention period of 7 days. You can [change the backup retention period](#change-the-pitr-backup-retention-period) to anywhere between 1 - 35 days.
140
140
141
141
If you delete a database, Azure keeps the backups in the same way it would for an online database. For example, if you delete a Basic database that has a retention period of seven days, a backup that's four days old is saved for three more days.
142
142
143
143
If you need to keep the backups for longer than the maximum retention period, you can modify the backup properties to add one or more long-term retention periods to your database. For more information, see [Long-term retention](long-term-retention-overview.md).
144
144
145
145
> [!IMPORTANT]
146
-
> If you delete the server or managed instance, all databases managed by that server or managed instance are also deleted. They can't be recovered. You can't restore a deleted server or managed instance. But if you configured long-term retention for SQL Database, the backups for the databases with LTR won't be deleted, and these databases can be restored.
146
+
> Setting up backup retention period to 1 day (or to any value between 1 - 7) is only supported via PowerShell or REST API at this time. Minimum required version of Az.SQL module is v2.6.0, or it can be executed through CloudShell which always has the latest Az.SQL version.
147
+
148
+
> [!IMPORTANT]
149
+
> If you delete the server or managed instance, all databases managed by that server or managed instance are also deleted. They can't be recovered. You can't restore a deleted server or managed instance. But if you configured long-term retention for SQL Database or manged instance, the backups for the databases with LTR won't be deleted, and these databases can be restored.
147
150
148
151
## Encrypted backups
149
152
150
-
If your database is encrypted with TDE, backups are automatically encrypted at rest, including LTR backups. When TDE is enabled for SQL Database or SQL Managed Instance, backups are also encrypted. All new databases in Azure SQL are configured with TDE enabled by default. For more information on TDE, see [Transparent Data Encryption with SQL Database and SQL Managed Instance](/sql/relational-databases/security/encryption/transparent-data-encryption-azure-sql).
153
+
If your database is encrypted with TDE, backups are automatically encrypted at rest, including LTR backups. When TDE is enabled for SQL Database or SQL Managed Instance, backups are also encrypted. All new databases in Azure SQL are configured with TDE enabled by default. For more information on TDE, see [Transparent Data Encryption with SQL Database & SQL Managed Instance](/sql/relational-databases/security/encryption/transparent-data-encryption-azure-sql).
0 commit comments