Forum Discussion

marksyn's avatar
marksyn
Level 2
8 years ago

VM Backup and VSS

I'm of the opinion that if you backup VMs with Backup Exec WITHOUT the agent or GRT options enabled in the job, then backup exec will still use VSS to quiece the OS, SQL Databases, Exchange etc to ensure a recoverable system (Flush all writes to disk before backing up the SQL DB etc etc)

Also, I assume I need VMware tools installed for all of this to work?

Could anyone clarify and back up opinions with official documentation?

 

 

 

6 Replies

  • It will use VSS on the application if the agent is installed, otherwise it's going to use VSS to do an open file backup of the file.
  • The VMware backup process does use the VMware tools (and part of our agent for Windows if installed inside the VM for GRT purposes)

     

    A basic version of the steps in the process being

    1. Backup job starts on the BE server and requests via our beremote process AND using the VMware provided vStorage Backup APIs that ESXi makes a snapshot of the VM that is being backed up.
    2. As part of the snapshot process, the vStorage API makes a call via VMware tools to perform VSS operations against the volumes within the VM
    3. As part of this VSS request by VMware tools, pre-freeze-script.bat is called which, if our Agent for Windows is installed causes the Backup Exec VSS Provider to be used
    4. Once the VSS request is reported as successful VMware tools feeds this back to the API so that the snapshot within the datastore can be completed and then notifies Backup Exec of the details of the snapshot so that the backup can continue with transferrring te data
    5. Onc3 the data transfer transfer completes, Backup Exec requests using the vStorage API that the snapwhot be removed
    6. This causes another request through VMware tools to remove the VSS snapshots within the VM and to run post-thaw-script.bat which undoes the Backup Exec VSS provider registration

     

    Note: point 3 is why you have to either deselect the shadow copy support when installing VMware Tools OR always makes sure the Agent for Windows is installed last, including after updating VMware tools,  as it disables the shadow copy parts of Vmware tools to avoid conflicts

     

    If you want official documentation (including the basci ability of the pre-feeze-script.bat process) then you need to look at the material provided by Vmware against the backup parts of the vStorage API as this explains how it works.

    If you run a backup job and look inside the Event logs of the VM then you should see VSS activity.

    • marksyn's avatar
      marksyn
      Level 2

      Thanks. Just for clarity, does this mean that for a crash-consistent backup (where all writes are flushed to disk before backup etc) we do not need to have the agent for Windows installed?

      If we did not install the agent for Windows, would transaction logs get purged too?

      My thoughts on the agent for Windows is that we need this only if we want to perform GRT restores?

      • Colin_Weaver's avatar
        Colin_Weaver
        Moderator

        If you do not install the Agent for Windows then you cannot protect SQL, Exchange or Sharepoint databases with GRT enabled (although please note you may have other envirojmental reasons why this might not be possible) and as you mention Transaction Logs - this does mean you have a DB technology of some kind so wil need the Agent for Windows installed (along with Capacity, V-Ray or Virtual Agent with Agent for App & DB licences installed on the BE server itself.

         

        With regards the transaction logs themselves the VSS operation can truncate logs although there may be some differences between Exchange and SQL in this respect. Exchange usually truncates the logs during a VM backup, SQL has to do a separate operation to do a log backup (and the newer versions of Backup Exec have a way to do such a Backup as part of the VM job.) This difference is due to functional differences in the mechanisms Microsoft provide (using VSS) to backup these database technologies and are not directly due to how Backup Exec or the VMware Backup APIs operate in themselves. .