Retention policy for Azure Blob Container - azure

I have a Cronjob which performs backups of PostgreSQL and uploads it to Azure Blob Container. Now I need to create a retention policy for these backups. How can I do this?
Retention policy: every day backups for the last week, every week for the last month, every month for the last year.

Related

Azure SQL Server LTR backup notification

Due to the requirements of ISO accreditation we need to setup notification logic when long term retention backup was taken in Azure SQL Server ( not SQL Server on Azure VM).
Does anyone have any ideas about how to accomplish this goal?
P.S we don’t want to move our DB to Azure VM, so we can’t use Backup Alert service or something like this that is related to SQL Server Azure VM deployment way.
There is no out-of-the-box method to achieve this. Shortest you can concentrate on is a week see.
Below are few points to consider.
You cannot control the LTR backup time, you can define a policy using a combination of four parameters: weekly backup retention (W), monthly backup retention (M), yearly backup retention (Y), and week of year (WeekOfYear) but not exact date and time.
Azure SQL database backups - responsibility to monitor and fix #11412
Possible workaround
Since LTR backups store full Database backups, this causes Metric Full backup storage size to update. You can monitor through custom charts and set alerts.
You can further leverage Azure Monitoring REST API

Automatic backup Azure SQL DataBase

I've configured the retention policy in 'Manage Backups' for my Azure SQL Server but nothing is appearing under 'Available Backups'. Does there need to be an associated storage account? If so, how do I set it up?
From Azure's doc it is known that the automatic backups (full, differential and transaction log) are possible. And it is possible to configure retention period for these backups. The main question is where these backups are stored (from documentation by default within RA-GRS Standard blob storage)? and whether it is possible to change storage account and how to access to standard storage account with backups?
Thanks in advance.
Automatic backups are part of Azure SQL Database service and are managed by Azure. You cannot change where these backups are stored, that is managed by Azure. You cannot access those backups and copy them to another storage account, and you cannot manage them.
You can use PowerShell Get-AzureRmSqlDatabaseRestorePoints to get the earliest possible restore point for the database based on the automated backup service.
Get-AzureRmSqlDatabaseRestorePoints -ResourceGroupName "resname" `
-ServerName "yourservername" -DatabaseName "yourDBName"
With automatic backups, full database backups are created weekly, differential database backups are generally created every 12 hours, and transaction log backups are generally created every 5 - 10 minutes, with the frequency based on the performance level and amount of database activity. The first full backup is scheduled immediately after a database is created. It usually completes within 30 minutes, but it can take longer when the database is of a significant size.
If you want to have control over backups, you want to have greater retention period, then you can configure long term backups o export bacpacs of your database to an storage account as explained here.

Increase Azure SQL Managed Instance backup retention beyond 7 days

Azure SQL Managed Instance provides a default backup retention of 7 days and this cannot be changed as per MS. Access to the Automated backups are not provided as well which is quite surprising. My client requires the backups to be restored for their analysis.
Requirement is to have last 14 days daily back and 1st day of every month backup to be saved.
How can the above requirement is meet? or How do we create automated
backups and auto archiving from our end in MI with TDE on?
Provide the location where these automated backups are stored.
Managed Instance now supports up to 35 days of backup retention (instead of 7) see https://learn.microsoft.com/en-us/azure/sql-database/sql-database-managed-instance-index#new-and-preview-features
MI Supports 7-35 days backups retention depends on pricing tier. MI also supports long-term retention of full backups for up to 10 years in Azure blob storage. You can't get access to Azure automated backups but you can schedule copy_only backups on URL.
For TDE and other information you can check following link:
https://learn.microsoft.com/en-us/azure/sql-database/sql-database-automated-backups
Updated information (May 2020):
Managed Instance now supports 1-35 day PITR backup retention for active databases, and 0-35 days for deleted databases (0 would mean no backup is kept). More info here: https://aka.ms/mi-backup-tuning.
LTR support for Managed Instance is also available with up to 10 years of retention. More info here: https://learn.microsoft.com/en-us/azure/sql-database/sql-database-long-term-retention#managed-instance-support

Determine retention period set on Azure Log Analytics workspace

Is there a way to determine the data retention period set on an existing Log Analytics workspace?
You can find the details of retention in pricing details
The first 5 GB of data ingested to the Azure Log Analytics service
every month is offered free.
Every GB of data ingested into your Azure Log Analytics workspace is
retained at no charge for the first 31 days.

How to keep / save a specific Azure backup

My daily backup policy for VM's keeps backups for 30 days.
Now I want to save a specific backup and keep it for a longer time. As a baseline for work.
Is this possible with Azure? How can I configure this?
I am assuming you need to backup the VM on demand. One of the ways this can be done is from the Azure Portal.
Navigate to the VM which needs to be backed up. Under Operations section , select Backup menu.
Click Back up now.
It gives an option to specify a date till which you want(a custom retention period) to preserve your backup copy.

Resources