SQL log files not truncating - x360Recover

Written By Tami Sutcliffe (Super Administrator)

Updated at August 17th, 2021

Problem

When running SQL 2005+ inside a guest VM, the Microsoft SQL transaction logs are not being truncated after an x360Recover backup succeeds. 

Cause

Since x360Recover uses Microsoft Shadow Copy tasks to backup VMs, it will only trigger a database backup, not a database log backup. Transaction logs will only be truncated when x360Recover runs a backup if you select the Simple Recovery Model for your SQL databases.
 
More information on SQL recovery models can be found here: https://msdn.microsoft.com/en-us/library/ms189275.aspx

Solution 

Simple Recovery Model

Under a Simple Recovery Model, SQL will truncate the transaction logs when a Shadow Copy is taken. This happens when (a) x360Recover requests a Shadow Copy from the MS Hyper-V VSS writer (b) which then cascades the Shadow Copy task into the guest VM and (c) the MS SQL VSS writer kicks off a database backup. This process will truncate the transaction logs (assuming that the SQL VSS writer is installed and enabled.)

Full or Bulk Logged Recovery Model

Under the Full or Bulk Recovery Model, the transaction logs are not truncated until a database log backup has been completed. (A x360Recover backup is not considered a database log backup.)

If the Full or Bulk Recovery Model is required, you will need to use the Microsoft SQL Management Studio to schedule a transaction log backup task, to maintain the transaction log size.

Note: This is not a best practice on how to set up a SQL server but an explanation of how x360Recover interacts with SQL and it's different recovery models.