How to Realize Instant Recovery VM with SQL Server and Logs

For using SQL Server in virtualized environments, Veeam provides a reliable way to achieve instant recovery while maintaining the integrity of SQL Server and transaction logs for precise point-in-time recovery.

By @Amelia Last Updated December 11, 2024
 

Instant recovery VM with SQL server and logs

I need run Instant VM recovery with installed SQL server, but before access VM I need use all SQL logs created after last image backup. Is it possible? …or may be new feature request?

- Question from Veeam R&D Forums

You can perform an instant recovery of a virtual machine with SQL Server installed and apply all SQL transaction logs created since the last full virtual machine image backup. This process needs to be managed to ensure database consistency and successful point-in-time recovery. This article will provide detailed steps as well as some considerations.

Steps to Instant Recovery VM with SQL Server and Logs

Following are detailed steps to achieve instant recovery VM with SQL Server and logs.

Step 1. Ensure Proper Backup Configuration

✦Enable Application-Aware Processing in Veeam: During backup job configuration, enable the Application-Aware Processing option to ensure SQL Server logs are captured and truncated correctly.

Transaction Log Backup: Configure Veeam to create frequent transaction log backups, this allows for fine-grained recovery points.

Step 2. Initiate Instant VM Recovery

In the Veeam Backup & Replication Console, go to Backups to locate the VM hosting SQL Server. Then select the most recent image backup and choose Instant VM Recovery. Specify the host and datastore for the recovered VM.

Step 3. Prepare SQL Server for Transaction Log Application

After the virtual machine has started, use the Secure Startup option to prevent the SQL Server service from being interfered with and to ensure that the SQL Server instance does not automatically attempt to recover the database.

Verify that the database is in a recovery state that allows logging applications. This is typically accomplished by restoring the database from a virtual machine backup using the NORECOVERY option:

RESTORE DATABASE [YourDatabase] FROM DISK = 'BackupFile.bak' WITH NORECOVERY;

Step 4. Apply Transaction Logs

▶Use Veeam Explore for Microsoft SQL Server to restore transaction logs:

Open the Veeam Explorer and locate the transaction log backups, then select the desired point-in-time for recovery. Apply the transaction logs sequentially to the SQL Server database within the recovered VM.

▶If you have manual log backups, you can choose to use SQL Server Management Studio (SSMS) to apply the logs:

RESTORE LOG [YourDatabase] FROM DISK = 'LogFile.trn' WITH NORECOVERY;

Step 5. Verify Recovery

Check database integrity using:

DBCC CHECKDB ('YourDatabase');

Ensure that all applications and services that rely on SQL Server remain offline until authentication is complete.

Some Considerations during the Configuration

When you configure the instant recovery VM with SQL Server and Logs, there are some matters you need to pay attention to.

🔶Log Backup Continuity: Ensure that the transaction log backups are performed without interruption between the last image backup and the recovery point.

🔶No overwriting: VMs must not overwrite transaction log files generated since the last image backup. Keep log backups stored separately.

🔶Database Recovery State: Ensure that the database remains in the correct state (NORECOVERY) during the log application.

Free Instant Recovery Tool for Data Security

AOMEI Cyber Backup is a software that provides you with convenient and powerful instant recovery to keep your data safe. Not only can you perform a series of operations from a simple page, but you can also centralize your tasks from a centralized console.

Now you can use AOMEI Cyber Backup by clicking the download button below.

Download FreewareInstant Recovery for VMware ESXi
Secure Download

Simple Steps to Set Instant Recovery for VMware

Step 1. In the AOMEI Cyber Backup web client, navigate to Backup Task to create a VMware backup for your VMs. In this process, you can schedule an automated backup for a VM recovery plan.

Step 2. Navigate to Task Instant Recovery + New Instant Recovery>Restore from task to configure the instant recovery.

Step 3. Click Select to choose the virtual machine and backup version.

Step 4. Choose the target device in Restore to.

Step 5. Then, set the hardware settings for the new virtual machine, such as the CPU quantityCPU Cores, and memory size.

Step 6. Click Start Restore to start the instant restore.

Step 7. After creating VM instant recovery, you can click Start Migration to migrate the virtual machine back to the production environment.

Conclusion

Veeam Instant Recovery enables rapid recovery of SQL Server while ensuring transaction log integrity. By combining Instant Recovery with backup capabilities, organizations can ensure business continuity and minimize downtime, and it's important to choose the right instant recovery tool for the job.