Restore Azure SQL Database LTR back-up via the Portal after deleting the original Azure SQL Server - azure

I can't find a straight answer to this question so hoping someone here came across this.
As the LTR backups are tied to the subscription there should be a way to restore a backup even if the original SQL Server that hosted the database is deleted.
How can these be viewed and restored via the Portal after the SQL Server is deleted?
Or via other means.

Currently there isn't a built-in method to restore the entire server. When a server is deleted (soft deleted) then you should call Azure support as soon as possible before a purge process that runs periodically fully removes the logical server. There are no SLAs for server deletions. So the quicker you can get to Azure CSS, the better it is.
If the server is deleted, there is no way to restore from automated built-in backups offered by Azure. Quoting from the page:
If you delete an Azure SQL Database server instance, all its databases
are also deleted and cannot be recovered. There is currently no
support for restoring a deleted server.
So everything is AS-IS. When a user deletes a logical server, you were asking the server to be deleted which is why you typed in the server name, etc. etc. CSS can work with engineering to figure out what is possible at best but there are no service-level guarantees unless Disaster Recovery (Geo-replication, Synchronization, long-term backups, etc.) was part of the deployment strategy.
I witnessed a case where a developer that works for a company in Costa Rica deleted their production Azure SQL logical server on a Thursday and Azure Support was able to recover on the next Monday. Usually Azure CSS gives a time frame of 7 days to recover an Azure SQL logical server that was accidentally deleted.
To avoid this in the future you can use “resource locks” which can protect against accidental deletion using Azure portal.

This question specifically asks about Long Term Retention backups which the other answers (so far) do not address. Yes, when a logical server is deleted, all the automatic backups are also deleted, but NOT the long term retention backups. If a database was configured to use LTR and the LTR backup's retention period has not expired, then yes you can restore from them.
After a logical server is deleted, you can't see the LTR backups from the portal so you must use Powershell commands to list them and issue the restore.
Get-AzSqlDatabaseLongTermRetentionBackup
Restore-AzSqlDatabase
This link gives a good basic tutorial.
https://www.mssqltips.com/sqlservertip/6443/how-to-restore-azure-sql-ltr-backup-after-azure-sql-instance-deleted/

If you delete your Azure sql server, then you could not backup it from the LTR backup.
Alberto Morillo has show you the document:
If you delete an Azure SQL Database server instance, all its databases are also deleted and cannot be recovered. There is currently no support for restoring a deleted server.
I also asked Azure support to get more message about your question. The replied me:
" Azure support can help you recover you Azure SQL server in 7 days after the deletion. You need to provide your server name and region for Azure Support."
You can call Azure Support from portal:
Hope this helps.

Related

How could I restore a Cosmos DB container if there is a periodic backup?

Is there a way to restore a Cosmos DB container after I accidentally deleted it? I just confused the live environment with a local Cosmos DB emulator.
When I go to the Settings - Backup & Restore it says:
Your account is on periodic backup mode. You can now change to continuous mode for a better backup and restore experience. Change to continuous mode
Does it mean that it is still somehow possible to revert the delete operation? But I can not find an option to revert the deletion.
For Cosmos DB containers configured with periodic backup (as you've mentioned is the case here), Microsoft has very prescriptive guidance on how to potentially restore the data. TL;DR - you should file a support request with the Microsoft Azure support team as soon as is feasible (being sure to include all information they need as indicated in the linked article). Their word choice in the linked document strongly indicates a time-sensitive aspect to this, and a relatively short window in which you need to lodge such a request to ensure the best possible outcome.
I've reproduced the relevant bits from the linked documentation below for convenience/posterity (emphases mine):
Request data restore from a backup
If you accidentally delete your
database or a container, you can file a support ticket or call the
Azure support to restore the data from automatic online backups. Azure
support is available for selected plans only such as Standard,
Developer, and plans higher than those. Azure support is not available
with Basic plan.
To restore a specific snapshot of the backup, Azure Cosmos DB requires
that the data is available during the backup cycle for that snapshot.
You should have the following details before requesting a restore:
Have your subscription ID ready.
Based on how your data was accidentally deleted or modified, you
should prepare to have additional information. It is advised that you
have the information available ahead to minimize the back-and-forth
that can be detrimental in some time sensitive cases.
If the entire Azure Cosmos DB account is deleted, you need to provide
the name of the deleted account. If you create another account with
the same name as the deleted account, share that with the support team
because it helps to determine the right account to choose. It's
recommended to file different support tickets for each deleted account
because it minimizes the confusion for the state of restore.
If one or more databases are deleted, you should provide the Azure
Cosmos DB account, and the Azure Cosmos DB database names and specify
if a new database with the same name exists.
If one or more containers are deleted, you should provide the Azure
Cosmos DB account name, database names, and the container names. And
specify if a container with the same name exists.
If you have accidentally deleted or corrupted your data, you should
contact Azure support within 8 hours so that the Azure Cosmos DB team
can help you restore the data from the backups. Before you create a
support request to restore the data, make sure to increase the backup
retention for your account to at least seven days. It’s best to
increase your retention within 8 hours of this event. This way the
Azure Cosmos DB support team will have enough time to restore your
account.
In addition to Azure Cosmos DB account name, database names, container
names, you should specify the point in time to which the data can be
restored to. It is important to be as precise as possible to help us
determine the best available backups at that time. It is also
important to specify the time in UTC.

How to create a backup of a SQL Azure DB with PITR and LTR history for Disaster Recovery?

I hope I am asking this in the correct community. I did check for SQL Azure in others, but could not find anything so here goes.
I am trying to work out the best strategy to create a backup of my SQL Azure DB if my main datacentre has a significant availability or integrity problem. My initial thought was to "Create a Database", in a different region, on a new DB Server, using the "Geo-Replicated Backup" which works excellently. However because it is on a new DB Server I lose all of my Short Term (PITR) and Long Term Retention(LTR) Backups which I might need to restore from for data correction or compliance.
So how can I backup this "history". I may have missed something simple, but my only ideas at present are:
Take automated "Exports" to BACPACs" to Azure Storage, say weekly.
Use specialised Backup software such as VEEAM SQL Azure Backup which retains multiple versions, and can operate at hourly intervals. Works off Transaction Logs.
Use Azure Failover groups which effectively use 2 DB Servers and 2 PITR and LTR setups.
Thanks in advance,

Azure Manage Backups menu missing

Im checking several tutorials about how to setup and configure a sql backup to blob, but what Ive found so far are to backup from Sql Server Management Studio.
I did found this nice article at azurelessons: https://azurelessons.com/backup-azure-sql-database/
But the problem I have is that they mention a "Manage Backups" option at the settings group (Sql server level) which I cannot seem to find:
And when I go to the Backups option on Data Management, it only shows me one that is 7 days old with the following legend: "Azure SQL databases are backed up automatically. Backup availability is listed below for each database on this server. Manage your available long-term retention (LTR) backups or restore a database here."
I have a failover group for the SQL server, but I would also like to have backups performed every 6 hours, and I just cant find the option where to do this, even on the SQL Database.
Thanks for the help.
It looks like you have a managed instance of SQL
Both SQL Database and SQL Managed Instance use SQL Server technology to create full backups every week, differential backups every 12-24 hours, and transaction log backups every 5 to 10 minutes. The frequency of transaction log backups is based on the compute size and the amount of database activity.
When you restore a database, the service determines which full, differential, and transaction log backups need to be restored.
Please check this link:
https://learn.microsoft.com/en-us/azure/azure-sql/database/automated-backups-overview?tabs=single-database

Azure VM machine restore issues

We have webserver & database are on azure VM machines. MySQL is installed on the azure VM machine. Recently, we had an issue with the database corrupt. And, asked Azure to restore the backup from old dates when everything working fine. Azure takes backup of the whole machine on daily basis. They restore the old backup on a separate machine. We supposed that the database will be fine there because the backup is of old date.
But, the issue is still the same.
So, my questions are:
How exactly VM takes backup of the whole machine?
And, does it reference the existing machine while restoring on some new VM machine?
How could I get the correct restored database files?
Note: MySQL logs are also attached.
The whole VM backup means that a point-in-time snapshot is taken. With a running database like MySQL this might mean that the database files are in an inconsistent state at the time of back-up. Extra configuration on the Virtual Machine is needed to provide a consistent backup in the form of pre- and post scripts. Microsoft details how to do this in this documentation
That however seems of little use in the situation you are in at the moment. As stated in the InnoDB recovery documentation a good option would be to force manual InnoDB recovery. Documentation for manual recovery can be found here.

How to Backup Windows Azure Server

I have a workgroup server on Windows Azure. I have used Rackspace before and simply image the server to back it up BUT thats not so easy on Azure as imaging the server deletes it!
My Azure server is used to run an application that uses an SQL Database. I backup the DB off site BUT need ensure I have a strategy for downtime of the server. I have looked into roles and instances but am fuzzy on it and getting lost in the many articles. See below what I have so far BUT I don't want the cost of two servers running for one application so **DOES ANYONE KNOW HOW TO ENSURE AVAILABILITY OF AN AZURE SERVER AND BACKUP THE CONTENTS IN THE EVENT OF A CRASH WITHOUT ftping EVERYTHING OFF SITE?
Azure is georedundant BUT you have to set up your server to avail of this feature
Current Azure setup is that we set up Workgroup servers and license them BUT I am fuzzy on where to go from here.
This is where it gets tricky
The number of per-role instances in a Windows Azure application is controlled by the Instances setting in the configuration (cscfg) file.
Windows Azure Service Configuration Schema http://msdn.microsoft.com/en-us/library/windowsazure/ee758710.aspx
How to Configure the Roles for a Windows Azure Application with Visual Studio http://msdn.microsoft.com/en-us/library/windowsazure/hh369931.aspx
Change the Number of Instances
To improve the performance of your application, you can change the number of instances of a role that are running, based on the number of users or the load expected for a particular role. A separate virtual machine is created for each instance of a role when the application runs in Windows Azure. This will affect the billing for the deployment of this application. For more information about billing, see Windows Azure Billing Basics.
• I will continue to research but if any of you know the answer (how can I easily backup my Azure server docs and data without ftping offsite) please feel free to weigh in!
If all you want is to back up the server, then you could use Recovery Services Vaults. This feature allows you to backup any Azure VM. The backup is a snapshot of the entire server.
You can test your contingency plan by restoring the backup to a new VM.
It depends on what you are trying to backup and scale. A proper cloud architecture should not store or persist data on local Azure servers, since that does not scale. You should be persisiting data to azure table storage, blob storage, SQL db and backup the data from there. Then you can use the APIs to backup anything from a central location.
if you are running something like SQL Server or SharePoint then there are some files peristed on the local VMs that you will need to backup. Luckily, those vhd drives are stored on BLOB storage and can be backed up as well in addition to geo redundant backup.

Resources