question

DanielNascimento-5742 avatar image
0 Votes"
DanielNascimento-5742 asked SadiqhAhmed-MSFT commented

Back up and SQL server inside an azure VM and the VM itself

Hello everyone,

I've been asked to configure a backup of an azure VM that runs SQL server inside it.

I made some research and found out that it's possible to backup the SQL Server inside the VM but i wanted to backup both (VM and the SQL Server that runs on it). To perform the backup of both, how should i configure the azure backup service? Should I configure 2 backups (one for the VM and other for the SQL) or is it possible to perform a backup of both with just one?


Thanks in advance,
Daniel Nascimento

azure-backup
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@SadiqhAhmed-MSFT I'm confused, the backup of the VM itself will not protect the SQL right? If i want to protect the SQL will always need to configure a backup to SQL?

0 Votes 0 ·
stan avatar image stan DanielNascimento-5742 ·

You would still have backup but that backup will not be useful as you cannot do proper restore. SQL has its own backup mechanism so it is consistent thus you need to make VM backup and SQL backup to protect fully.

0 Votes 0 ·
SadiqhAhmed-MSFT avatar image SadiqhAhmed-MSFT DanielNascimento-5742 ·

@DanielNascimento-5742 Azure VM backup will protect the entire VM including the SQL Server. However, as mentioned by "Stan" restore experience would be different if you are intending to restore your SQL Server database.

So, In-short - If you want to backup and restore SQL Server then it is better to use SQL Server backup as mentioned in my first post.


If the response helped, do "Accept Answer" and up-vote it

0 Votes 0 ·
stan avatar image
2 Votes"
stan answered

Hi,
Yes this is correct, you need to configure two backups - one for the VM and another for the SQL. You cannot perform one backup. Backup for VMs and backup for SQL have two different backup policies. For example you can backup the VM only one time in the day where for SQL you can backup hourly for the log besides doing full backup as well.

Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SadiqhAhmed-MSFT avatar image
1 Vote"
SadiqhAhmed-MSFT answered

@DanielNascimento-5742 If the target Azure VMs are being backed up using the Azure VM Backup method, then all files/folders will be included in that backup; thus allowing you to retrieve a previous .BAK file.

If, however, the Azure VMs have been configured to use the SQL Server Backup in Azure VMs method, this is only protecting the targeting databases, not the entire VM (or it’s file system).

83324-image.png

FAQ reference link - https://docs.microsoft.com/en-us/azure/backup/faq-backup-sql-server#can-i-use-azure-backup-for-iaas-vm-as-well-as-sql-server-on-the-same-machine



If the response helped, do "Accept Answer" and up-vote it


image.png (40.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.