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.
Related
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.
I have a couple of VMs that I want to backup and restore easily and often. Preferably as a group.
I have tried default Azure backup and restore but noticed that it doesn't seem to do much. It is easy to create and schedule backups but it is not clear to me how these backups can be used to bring a VM back to its original state.
The use cases for the default backup / restore seem to be very different from what I expected. I expected something somewhat similar to VirtualBox: take a snapshot and then restore takes the VM back to the snapshot.
Restore of VM in Azure does not seem to be a supported use case. I think the idea is more to clone / duplicate the machine.
The default "restore" is a feature to create another VM because it you try to restore Azure shows an error message
A virtual machine with the same already exists in the selected resource group. Please change the virtual machine name or select a new resource group.
There is an option to restore disks. This seems to work at first. Restore job completes successfully but nothing it restored. The file system is the same as before restore.
There is no detailed log so there is no way to determine what is happening. There is only exit status: success restore completed successfully.
Are there other ways to mimic VirtualBox functionality? Take snapshots and restore VM's using such snapshots?
Does MS have plans to enhance backup in such way that it also supports restore?
Snapshot works by capturing image state of a virtual machine. In Azure, you can snapshot your VHD and restore that snapshot whenever you'd like. Get started with snapshot here https://learn.microsoft.com/en-us/azure/virtual-machines/windows/snapshot-copy-managed-disk
Disk snapshot works best in case your virtual machine uses one disk (for the OS). Or if that virtual machine has more than one disk, disk snapshot is still useful, but takes time and may result disk management overhead. In that case, you could go with image generalization to capturing the whole virtual machine's state at once using tool like sysprep (https://learn.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource)
From your screenshot, the problem is exactly what is highlighted in red. You cannot overwrite your virtual machine to the existing one in the same resource group. You must restore it somewhere else.
Azure Site Recovery and Backup is designed to work with large deployment of virtual machines, with some capabilities of automation and disaster recovery.
I have a windows VPS, not on azure. I'm looking into the Azure backup services.
Ideally I'd like to backup the whole VPS to azure. Lets say MY current VPS dies, then I can just use the Azure backup to create a new VPS, with all programs, settings, files, databases everything.
I'm not sure which of the azure options to pick for this:
Does anyone know any good resources or what each of the options mean, or have any suggestions? I've read lots on the Azure website but it's not particularly clear.
Apologies if this is basic stuff or I've missed an obvious resource, I'm new to servers.
Many thanks,
Phil.
If you want to have a full backup of your machine choosing 'files and folders' and 'system state' is your best option:
Files and folders will allow you to recover individual files and folders on your machine. Imagine a user accidentally deletes a file, you can recover it from the backup.
System State will allow you to recover your system state (configuration of your machine) if your machine would be corrupted.
The other items in there will allow you to recover from specific sources (Hyper-V or VMware) or to take application consistent back-ups.
To recover a full machine, I would enable files/folders and system state backup. With Azure Backup you can restore either on Azure (on a VM on Azure) or on the source server.
Make sure to also have a look at Azure Site Recovery. With Azure Site Recovery, you can 'mirror' a machine towards Azure. This will allow you to very quickly restore a machine in case of corruption on Azure. If your source is a VPS, you would only be able to restore to Azure with site recovery, not go back to the VPS.
I have worked with EXSi Servers lot of times.They provide snapshot option which can be used to revert back the same server to any point of snapshot that we taken.
I was unable to find the same in AWS and Azure.These cloud enterprises provide the option to backup the server.
AWS backups the whole volume.
Azure provide vault800 backup wizard which is incremental.
We can create a new Server with that backup, but we cannot revert back the same server.The EXSi Server take snapshot 10% of 100% volume of server and revert back as per our requirement.
For Azure, take a look at blob snapshots.
Azure Storage provides the capability to take snapshots of blobs. Snapshots capture the blob state at that point in time.
Pretty much the same story with AWS:
You can back up the data on your Amazon EBS volumes to Amazon S3 by taking point-in-time snapshots. Snapshots are incremental backups, which means that only the blocks on the device that have changed after your most recent snapshot are saved
how about using a 3rd party backup solution like Veeam or cloudberry to take image based backup copies and replicate them onto preferred cloud storage.
Veeam also supports instant VM recovery, you can immediately restore a VM into your production environment by running it directly from the backup file. Instant VM recovery helps improve recovery time objectives (RTO), minimise disruption and downtime of production VMs. It is like having a "temporary spare" for a VM: users remain productive while you can troubleshoot an issue with the failed VM.
I want to move an existing server 2008 instance from Rackspace/Hostway to Azure. Can I do a full OS/data backup, copy the backup file to the Azure server, and then restore from the backup file? How do you suggest me migrating this server to Azure? Hostway will not let me get a copy of the VMDK file.
Have you tried contacting the support for providing you with either VMDK or a VHD file? Why are you so sure they won't give it to you?
If they don't you could do a full system backup with either Windows Backup or any imaging software. Get that backup locally. Restore the backup locally on a virtual Machine. Run sysprep on that local VM. Get the VHD, upload it to Azure and finally create a Windows Azure VM from that VHD.
You can provision a SQL VM in the azure cloud and then synch your database to it directly or copy the database files directly to it. This has a vast performance improvement as well over the SQL Azure service and for a large business app with a lot of DB access we found that this is almost a requirement than an option. (DB should be on your C drive so that it runs on the local disk.) SQL Azure is slow because of how data is replicated, a local VM running the service is highly advised. We have an 11GB DB and this was the only way to get some reasonable performance out of it.
See https://stackoverflow.com/questions/2711868/azure-performance/13091125#13091125 for our benchmarks. I've done testing on SQL on VMS and it's on par with an on premises solution.