r/SQLServer • • Jun 11 '26

Question SQL Backup Help

EDIT: u/Hungry_Debt_6500 is OP. Please check their reply.

Please I am hoping for some feedback

Specifications:

Windows Server 2022

SQL Server 2022

Availability Group with 4 replica

All on prim and no cloud access

I am trying to make sure I am using the best method of backing up my databases. I cannot use the Ole Hallengren jobs because of my environment

Currently I have all four nodes set up with FULL, DIFF and TRN backups using SQL Maintenance plans. All plans run the jobs at exactly the same time. I have the backup preference set to primary and there are no copy only settings. All backups are using two shared folders depending on which node is primary. Node 1,2 backup to folder A, Node 3,4 backup to folder B. Backup jobs are going fine and when there is a fail over the backup run on the correct folder - no problems

I am doing FULL on Saturday, DIFF Daily, and TRN every 30 minutes. When there is a failover the DIFF and TRN backups start up in the new folder just fine.

My restore plan is to take the FULL, DIFF and TRN files move them to a folder on the server and then do a restore using the GUI in SSMS

Q: Is this good practice for Availability Group

Q: Other than using Ole jobs or cloud do you recommend any other process for running these backups

Your feedback is appreciated.

6 Upvotes

23 comments sorted by

View all comments

Show parent comment

3

u/SlavFromTheEast Jun 12 '26

Seems like you have made your mind and look only for an approval from community, while community suggests you to use Hallengren's solution.

Argument "open source bad" is irrational and hard to be argued with, but the same way you cannot be sure closed software is free of injections. In case of Hallengren you don't really need to read it line by line, just verify each DML commands that may pose a threat - DELETE, UPDATE, TRUNCATE, INSERT...

Also I've been using Hallengren's for customers from different sectors - gov, finance, pharma, energy. Never have that been seen as a security risk.

Maintenance plans as others suggested is an old way of working which can be effectively replaced with modern solutions, like Hallengren or dbatools for example.

Anyway, Godspeed and good luck

1

u/alinroc 4 Jun 12 '26

you cannot be sure closed software is free of injections

Case in point: Solarwinds’s build pipeline was compromised for several months back in 2020, most likely by Russia.

1

u/Hungry_Debt_6500 Jun 15 '26

I am not saying Ole jobs are bad they are actually very good and I have used them extensively in the past. I was on a site with 200 SQL servers and they all had Ole jobs on them for backups, index rebuilds and Integrity checks.

More over I have already gone line by line in the backup stored procedure to resolve an issue with Ole jobs as well.

Quick story, I had three availability groups (three replica each) that where failing backups. I found that the DBA before me had set up the Availability Group with a space preceding the name. The ole job kept error with \\ AGName\dbname\... folder not found and I could not figure out why. I finally discovered that the AG was built with a space in the name and the ole job tank because of that.

There was no way to fix this except to drop and recreate the AG which was not an option. I did not see a way to rename an availability group.

My option was to create maintenance plans for all nine servers or get the ole job to trim that space, so I went through the entire stored procedure and put a left trim everywhere the AG name was called out. Unfortunately, it still did not work, so I had to create maintenance plans for all those servers. Folks there must have been a good 100 or more instances of the AG name in that file.

After working on the script for several hours I realized the power of the Ole job is that it accounts for every situation possible - of course except for a space in the name which is not a show stopper because that like never happens except for in my case. And yes I even tried to put a space in the folder name too.

My theory with Ole

-If its on the server and working fine I leave it
-If its on the server and failing I will fix it
-If I cannot fix it I will replace it.
-If it's a new server I use maintenance plans

Please don't bash me because I am leery of open source, and likely will not be using dbtools either. Also once bitten twice shy I know about the SolarWinds breach and have asked the SW admin not to put the agent on my servers.

I have already tested the restore and it worked fine and I will be testing on a monthly basis

Back Story - so what is the reason for my post. Well I performed a test restore and it failed. I panicked and thought that all my maintenance plans were garbage. Turn out I forget I had made a SQL FULL Backup while patching the server and was using a FULL from the week before.

Thank you for all the feedback.