Skip to main content

Hello, everyone,

Taking up the excellent guide on Veeam Plugi-SQL by @leduardoserrano 

   I share with you the anatomy of installing and configuring and restoring an MSSQL Database in Always On mode.

 

Installing and using the Veeam Plug-in for SQL Server | Veeam Community Resource Hub

  • Veeam Plug-in for Microsoft SQL Server

Veeam Plug-in for Microsoft SQL Server - Veeam Plug-ins for Enterprise Applications

  • How Veeam Plug-in for Microsoft SQL Server Works

How Veeam Plug-in for Microsoft SQL Server Works - Veeam Plug-ins for Enterprise Applications

  • Parallel Database Processing
  • Supported Backup Repositories

https://helpcenter.veeam.com/docs/backup/plugins/repos_mssql.html?ver=120#supported-backup-repositories

Make sure the repository is configured as described in the ExaGrid section in the Veeam Backup & Replication User Guide.

  • Installing Veeam Plug-in for Microsoft SQL Server

Installing Veeam Plug-in for Microsoft SQL Server - Veeam Plug-ins for Enterprise Applications

 

Mount Iso Veeam

D:\Plugins\Microsoft SQL\x64

 

Installing Veeam Plug-in - Veeam Plug-ins for Enterprise Applications

  • Access and Encryption Settings on Backup Repositories

Access and Encryption Settings on Backup Repositories - Veeam Plug-ins for Enterprise Applications

 

Create dedicated User

  • Granting Permissions to Users
  • Create a new access control list (ACL) with Read and Write permissions using this set of commands:
  • $newACL = New-Object System.Security.AccessControl.FileSecurity #creates a dedicated ACL 
    $newACL.SetAccessRuleProtection($true,$false) #disables inheritance and deletes all inherited permissions
    $newACL.AddAccessRule( (New-Object System.Security.AccessControl.FileSystemAccessRule("SQL-Plugin","Read","Allow"))) # allows read
    $newACL.AddAccessRule( (New-Object System.Security.AccessControl.FileSystemAccessRule("SQL-Plugin","Write","Allow")))# allows write

     

  • Assign ownership of the new ACL to the previously created user group by running the following command:
$newACL.SetOwner(>System.Security.Principal.NTAccount]"SQL-Plugin") #sets owner for the ACL

Prima di lanciare questo comando è necessario configurare il Veeam Plug-in MS SQL per la creazione del file veeam_config.xml

set-acl -Path:%PROGRAMFILES%\Veeam\Plugins\Microsoft SQL\veeam_config.xml -AclObject:$newACL #apply ACL to the plug-in configuration file
set-acl -Path:"C:\Program Files\Veeam\Plugins\Microsoft SQL" -AclObject:$newACL #apply ACL to the plug-in configuration file
  • Configuring Veeam Plug-in for Microsoft SQL Server - Support for Always On Availability Groups

 

Configuring Veeam Plug-in for Microsoft SQL Server - Veeam Plug-ins for Enterprise Applications

https://helpcenter.veeam.com/docs/backup/plugins/repository_permissions_mssql.html

https://helpcenter.veeam.com/docs/backup/plugins/configuring_mssql_plugin.html?ver=120#utility

  • Launch the %PROGRAMFILES%\Veeam\Plugins\Microsoft SQL\Veeam.Backup.MSSQLPlugin.UI.Configuration.exe file.
  •  It is now possible to set ACLs with the command

 

 

  • Specifying the Version of Microsoft ODBC Driver for SQL Server

Specifying the Version of Microsoft ODBC Driver for SQL Server - Veeam Plug-ins for Enterprise Applications

https://learn.microsoft.com/en-us/sql/connect/odbc/microsoft-odbc-driver-for-sql-server?view=sql-server-ver16

  • Download ODBC driver 18 & install if you need it

https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver16

  • Specifying the Version of Microsoft ODBC Driver for SQL Server

 

Specifying the Version of Microsoft ODBC Driver for SQL Server - Veeam Plug-ins for Enterprise Applications

Add the following parameter to the <PluginParameters /> line in the Veeam configuration XML file:

C:\Program Files\Veeam\Plugins\Microsoft SQL\veeam_config.xml

 

  • Support for Always On Availability Groups

Support for Always On Availability Groups - Veeam Plug-ins for Enterprise Applications

Copiare eseguibile su entrambi inodi AlwaysON

  • Install and configure Veeam Plug-in for Microsoft SQL Server on each node of the cluster that runs Always On Availability Groups
  • Configuring Veeam Plug-in for Microsoft SQL Server - Support for Always On Availability Groups

 

Configuring Veeam Plug-in for Microsoft SQL Server - Veeam Plug-ins for Enterprise Applications

https://helpcenter.veeam.com/docs/backup/plugins/repository_permissions_mssql.html

https://helpcenter.veeam.com/docs/backup/plugins/configuring_mssql_plugin.html?ver=120#utility

  • Launch the %PROGRAMFILES%\Veeam\Plugins\Microsoft SQL\Veeam.Backup.MSSQLPlugin.UI.Configuration.exe file.
  • Configure backup settings in Veeam Plug-in on each node and save backup settings as SQL Agent jobs in Microsoft SQL Server Management Studio

 

  • Configuring Backup Settings

https://helpcenter.veeam.com/docs/backup/plugins/mssql_configure_backup.html

  • Or lunch SQL Server Management Studio 19 from primary node AlwaysOn
  • In Microsoft SQL Server Management Studio on each node, configure the same schedule settings for SQL Agent jobs so that database backup will start at the same time on each node.
  • Monitor Backup Process

https://helpcenter.veeam.com/docs/backup/plugins/mssql_backup_script.html

 

  • Schedule job agent
  • Create backup jon for Logs

 

  • Primary Node Log

 

 

Secondary node Log there is no backup log as it is skipped.

  • Managing Backup Job in Veeam Backup & Replication

Managing Backup Job in Veeam Backup & Replication - Veeam Plug-ins for Enterprise Applications

https://helpcenter.veeam.com/docs/backup/plugins/mssql_job_vbr.html?ver=120#disabling-backup-job

  • Deleting Backup

Deleting Backup - Veeam Plug-ins for Enterprise Applications

  • Press and hold the >CTRL] key, right-click the backup and select Remove from configuration  &“Repair”
  • Repairing Backup

Repairing Backup - Veeam Plug-ins for Enterprise Applications

  • Performing Restore

Performing Restore - Veeam Plug-ins for Enterprise Applications

Support for Always On Availability Groups - Veeam Plug-ins for Enterprise Applications

  • Restore of Always On Availability Groups

To restore a database that operates as part of an Always On availability group, complete the following steps:

  1. Restore the database on the primary replica. During the restore process, Veeam Plug-in will remove the original database from the availability group and delete it from Microsoft SQL Server.
  2. Perform log backup for the restored database.
  3. Remove the original database from the secondary replica.
  4. Add the restored database to the availability group.
  • Primary node check the DB was dropped from the Alwayson instance
  • Go to the secondary node and drop the DB
  • Re-insert the rewritten DB via the Alwayson wizard

 

Done 😋

Wow!  Now that was lengthy but a great article.  😂👍


Wowzers! Long but really insightful post @Link State . Well done, sir! Thanks for sharing. 😊


Thank you @coolsport00 


Had to go through this again today. This is thorough! 


Dang this is a long post...but great info here for anyone that needs to set this up!


Congrats for this detailed guide, @Link State !


Comment