Veeam and SQL Clusters in Azure, Part 2: The Veeam Plug-in for SQL
// Table of Contents
Hello All and welcome back!
In Part 1 we protected two SQL clusters in Azure, an Always On availability group (AG) and a failover cluster instance (FCI) on a shared disk, with the Veeam Agent. One protection group, one cluster-aware job type, and failovers handled without a new full backup.
Today it’s the DBA’s turn. The Veeam Plug-in for SQL backs up databases through SQL’s own backup engine, straight into a Veeam repository, and the DBA can drive it from inside SQL Server Management Studio (SSMS). Then we’ll run the plug-in and the Agent together and look at which one you’d pick when.
Right, let’s get into it.
Why Give the DBA the Plug-in?
The Agent backs up the whole server, which is brilliant for the backup team. DBAs think in databases and points in time though, and they like their own tools. The plug-in gives them exactly that:
- Native SQL full, differential and log backups, landing in a Veeam repository rather than on a file share
- Point-in-time restores from the log backups
- Backup and restore from SSMS, without opening the Veeam console
And you, the backup admin, still see every backup in Veeam, in the same repositories as everything else.
Step 1: Deploy It from the Protection Group You Already Have
This is the easy bit! If you followed Part 1, Veeam already knows both clusters through the Active Directory protection group.
- Edit the protection group and go to the Options step
- Tick Install application plug-ins: Microsoft SQL Server
- Save it and let the rescan run
Veeam pushes the plug-in to every node of both clusters, right beside the Agent. No logging on to servers, no installers to copy around.
Step 2: Create a Backup Policy
- Go to Home > Jobs > Backup > Application > Microsoft SQL Server
- Give the policy a name (I made one per cluster)
- On Databases, click Add
The Select Objects window doesn’t just show servers. Veeam has worked out what SQL is running where, so under the protection group you’ll see the clusters, the AG itself, and the FCI’s SQL instance by name.
So which one should you pick? The SQL object, not the Windows cluster:
- For the AG, pick the availability group (AG-Demo). Veeam backs it up from whichever replica the AG’s backup preference points at.
- For the FCI, pick the instance (sqlfci). It follows whichever node is running SQL, so a failover changes nothing in Veeam.
Here’s my FCI policy, with sqlfci in as a Cluster Instance:
Then finish the wizard:
- Storage: your repository and retention
- Credentials: an account with the sysadmin role in SQL
- Log processing: how often to back up the transaction logs. Select the object, click Edit and set the minutes (I went with every 15)
- Schedule: when the policy runs. In my lab each run after the first full was a differential, and the full backups get their own weekly or monthly schedule under Advanced on the Storage step
Run the policy and open its session. On the FCI you’ll see master, model and msdb processed alongside the user database, because the policy covers the whole instance:
And when I checked SQL’s own backup history afterwards, it was spot on: full backups, differentials in between, a log backup every 15 minutes, and on the AG they all ran on the primary.
The DBA’s View: Veeam Inside SSMS
Open SSMS on a node and you’ll find a Veeam toolbar, with backup and restore right there for your DBA.
Just a heads up, this one caught me out. The SQL Server image I used in Azure ships with SSMS 20, and I couldn’t find the toolbar anywhere. It turned up in SSMS 22. On the nodes where I installed SSMS 22 before the plug-in went on, the toolbar registered itself, so that’s the order I’d go with.
Point-in-Time Restore: Rewinding a Classic Mistake
Every DBA has a story about an UPDATE without a WHERE. Let’s make one:
USE AdventureWorksLT2022;
SELECT SYSDATETIME() AS just_before_the_mistake; -- note this time
UPDATE SalesLT.Customer SET EmailAddress = 'oops@example.com'; -- every customer, whoopsMine ran at 05:44:22, and all 847 customers now had the same email address. Not a great start!
Let’s get them back. I did the whole restore from SSMS:
- Click Restore Database on the Veeam toolbar
- Source: pick the database (AdventureWorksLT2022)
- Restore Point: select Restore to any point in time and drag the slider to just before the mistake
- Target: restore it alongside the original under a new name (I used AdventureWorksLT2022_Rewind). The files landed in the same DATA folder as the original’s, named after the new database, so nothing clashed
- Click Run
One thing to plan for: to rewind to a moment, you need a log backup taken after it. The first time I opened the wizard, the slider stopped at 5:38 AM, six minutes short of my mistake, because that’s when the last log backup had run. With logs every 15 minutes, that’s at most a 15-minute wait, so I waited for the next one and opened the wizard again.
Then the slider caught me out. It shows minutes, but it picks a second inside that minute. I set it to 5:44 AM, and SQL’s restore history says the restore stopped at 05:44:37, fifteen seconds after my UPDATE. So my shiny new copy had the oops emails in it as well! Pick the minute before your mistake, and check the copy before you trust it:
SELECT COUNT(*) AS oops_rows
FROM AdventureWorksLT2022_Rewind.SalesLT.Customer
WHERE EmailAddress = 'oops@example.com';Second time round I went with 5:43 AM. The restore stopped at 05:43:13, and the check came back with a lovely big 0:
Once the copy’s clean, copy the good data back across:
UPDATE c SET c.EmailAddress = r.EmailAddress
FROM AdventureWorksLT2022.SalesLT.Customer AS c
JOIN AdventureWorksLT2022_Rewind.SalesLT.Customer AS r ON r.CustomerID = c.CustomerID;All 847 customers got their real email addresses back, and nobody needs to know (no judgment here!).
I learned this one the hard way. The plug-in restores whole databases. The first time I dropped a table, I went looking for a restore-table button, and there isn’t one. What you do instead is restore a copy of the database to just before the drop, then copy the table back. It works, it’s just more hands-on than the Agent’s table-level restore from Part 1.
One more thing worth knowing on the AG: a restored database comes back as a normal standalone database, not in the AG, so you add it back to the AG yourself. The first time I saw my restored copy sitting outside the AG was a bit strange.
Running Both Together
So can you run the plug-in and the Agent on the same servers? Yes, as long as only one of them owns the transaction logs. If both back up the logs, each one’s chain has gaps where the other took a log backup, and neither can rewind to every point in time on its own.
The recipe:
- The plug-in owns the logs: full and differential backups, plus logs every 15 minutes
- The Agent goes copy-only: in the Agent job, set the SQL processing to Perform copy only, so its snapshots never touch the log chain
Don’t take my word for it, ask SQL. Run this on the FCI, or on the AG’s primary:
SELECT TOP 12 database_name, type, is_copy_only, backup_finish_date, user_name
FROM msdb.dbo.backupset
ORDER BY backup_finish_date DESC;In my lab, the Agent’s snapshots show up with is_copy_only set to 1, run by NT AUTHORITY\SYSTEM, and the plug-in’s backups (D for full, I for differential, L for log) run under the policy’s account. I checked the log chain on both clusters too: every log backup starts exactly where the one before it ended. Exactly what I wanted!
So Which One Should You Use?
Here’s how I’d sum it up for a big database, say 50 TB:
| Veeam Agent (cluster job) | Veeam Plug-in for SQL | |
|---|---|---|
| What it protects | The whole server, every disk including the shared one | Databases only |
| Daily load | Incrementals read only changed blocks (with the CBT driver) | Every full reads the whole database; differentials and logs in between |
| Rewind to a point in time | Each restore point, or any second if the Agent backs up the logs | Any second covered by the log backups |
| Ways to get data back | Database, single table, publish, instant recovery, export, whole server | Database restore, to the original or another server |
| Time to usable data | Minutes with publish or instant recovery | However long it takes to copy the database back |
| Who drives it | The backup team, in the Veeam console | The DBA in SSMS, or the backup team through a policy |
Let’s be honest, there’s no wrong answer here, and that’s the beauty of it: you don’t have to choose. Give the DBA the plug-in for their logs and their point-in-time restores, keep the Agent copy-only for the fast, flexible restores, and keep the Agent’s retention short so a 50 TB database isn’t stored twice for long.
A Few Things Worth Knowing
A few things to keep in mind, in the order you’re likely to hit them:
-
Check your license first.
- The Agent and the plug-in both use instances on your Veeam license, so check how running both on the same servers counts for you before rolling them out.
-
One object, one policy.
- A server, instance or database can only be in one plug-in policy, or the policy fails.
- Don’t add the AG to one policy and its nodes to another.
-
The AG’s backup preference matters.
- With a Veeam-managed plug-in, only Primary and Any Replica are supported.
- Any other setting and Veeam may pick a secondary, and the policy fails.
-
The AG policy only covers the AG’s databases.
- Each node’s own system databases (master, msdb, model) aren’t in the AG, so they aren’t in that policy.
- The FCI’s policy targets the whole instance, so its system databases come along.
-
Plug-in backups are restore-only in Veeam Explorer.
- Publishing, instant recovery and export aren’t available from plug-in backups, and that’s where the Agent backup earns its place.
Wrapping Up
Two clusters, two ways to protect them, and they get along nicely as long as you tell them who owns the logs. The DBA gets point-in-time restores from inside SSMS, and the backup team keeps every backup in one place.
Thanks for reading, and happy backing up 🙂