September 17, 2013 at 10:05 am
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
September 18, 2013 at 5:37 am
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
September 18, 2013 at 5:46 am
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
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
September 18, 2013 at 9:26 am
Understood. Thanks for the help.
-tim
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply