SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Sql 2012 AlwaysOn Backups on All Servers?


Sql 2012 AlwaysOn Backups on All Servers?

Author
Message
Tim-690839
Tim-690839
SSC Veteran
SSC Veteran (259 reputation)SSC Veteran (259 reputation)SSC Veteran (259 reputation)SSC Veteran (259 reputation)SSC Veteran (259 reputation)SSC Veteran (259 reputation)SSC Veteran (259 reputation)SSC Veteran (259 reputation)

Group: General Forum Members
Points: 259 Visits: 69
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
Steve-3_5_7_9
Steve-3_5_7_9
SSCrazy
SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)

Group: General Forum Members
Points: 2978 Visits: 1609
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



Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)SSC Guru (99K reputation)

Group: General Forum Members
Points: 99511 Visits: 33014
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
Tim-690839
Tim-690839
SSC Veteran
SSC Veteran (259 reputation)SSC Veteran (259 reputation)SSC Veteran (259 reputation)SSC Veteran (259 reputation)SSC Veteran (259 reputation)SSC Veteran (259 reputation)SSC Veteran (259 reputation)SSC Veteran (259 reputation)

Group: General Forum Members
Points: 259 Visits: 69
Understood. Thanks for the help.

-tim
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search