SQL Server Backup – How to Backup a VM with SQL Server

backupsql servervmware

I have SQL Server running on a virtual machine (VM). Weekly VM backup is done. My question is when we backup the VM, does it locks down the SQL Server or the databases residing in that SQL Server? I understand VM backup is at the OS level but still want to confirm since I am in middle of investigating an issue and I am not a database expert.

Best Answer

If the "SQL Server VSS Writer" service is running IO on the database files will be "frozen" while a snapshot is made of the databases and the database state (full database backup) will be included with the VM backup. This will not lock down the SQL server but will in some cases make it slower.

If the service is not running the database files will not be included in the backup and you have to use other means to backup them. This needs to be discussed with your DBA in many cases having full backups taken with the VM backups breaks the backup chain the DBA is maintaining and you should definitely make those backups more often than weekly and backup your transaction log as well. The VM backup (snapshot) can also affect performance of the SQL Server even though it's not making a snapshot of the database files.