Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Sql 2012 AlwaysOn Backups on All Servers? Expand / Collapse
Author
Message
Posted Tuesday, September 17, 2013 10:05 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, September 22, 2014 3:39 PM
Points: 15, Visits: 58
I'm setting up a VM development environment and was wondering if it's possible with Sql 2012 AlwaysOn to get backups on all the servers in the availability group. I understand the point of offloading backups to your secondary machine is so your primary doesn't have to dedicate resources to backup jobs but we don't do a lot of work overnight so it's not a problem to take full backups on the primary in the middle of the night. We take tlog backups throughout the day.

So, wouldn't it be better to take backups on the primary and secondary in case the primary server dies? I've played with the settings in the Back Up Database Task in Maintenance Plans and can't find a good way to have both the primary and secondary replicas take a backup, regardless of which is primary and which is secondary.

Am I missing some easy way to do this? Thanks in advance for your opinions or suggestions.

Tim
Post #1495572
Posted Wednesday, September 18, 2013 5:37 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, December 2, 2014 5:58 AM
Points: 924, Visits: 1,445
We are using "Always On" and only take backups on one server; actually the primary server.

There isn't a need to take backups of both servers because if the Primary server "dies", as you indicated in your scenario the Group would failover to the other server and you would run your backups there.

Our configuration is like this:

-the same backup job is on each server
-the 1st step in the backup job is the check to see if the group is on the "primary replica". I wrote a function that checks for primary replica which accepts the "group name" as a parameter.
-if the group is on the primary replica the backup runs (step 2); if not the job just exits

This can work either way, say you wanted to run the backup only if the group were on the "secondary replica" then continue.

Note:
1. We didn't use the backup wizard to create our backup jobs, just good old sql scripts.


Steve



Post #1495868
Posted Wednesday, September 18, 2013 5:46 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 8:22 AM
Points: 14,205, Visits: 28,534
Just remember that you can only do transaction log backups or full backups with COPY_ONLY on the secondaries. If you're already running everything on the primary and it's not hurting performance, I agree with the last poster, I'd just leave it that way.

----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server Query Performance Tuning
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1495873
Posted Wednesday, September 18, 2013 9:26 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, September 22, 2014 3:39 PM
Points: 15, Visits: 58
Understood. Thanks for the help.

-tim
Post #1495981
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse