Scheduling SQL backups?
Updated: 16 Dec 2010 | 11 comments
This issue has been solved. See solution.
Using the above schedule for a policy (click on pic to see the Frequency column), it appears that each week, the appropriate "Auto" runs (i.e. Yearly, then Weekly, etc.), but the problem is that it seems to keep running the "Yearly_App" regardless of which "Auto" policy is running.
The goal is each weekend to do one backup that will alternate b/t the following schedules/retentions:
- Yearly backup every 52 weeks, retention of Infinity (9)
- Quarterly backups every 3 months, retention of 1 Year
- Monthly backups every month, retention 3 months
- Weekly backups each weekend, retention 1 month
Do I need to create separate policies, or what can I change to accomplish what I want? And if I do create separate policies won't I end up with multiple backups running on some weekends (for example, one weekend a year, the Yearly and the Weekly will run)?
Discussion Filed Under:
Comments
separate policies
I would dump the automatic schedules and just use the Application schedules in separate policies with different retentions. Remember the Application schedules will be run from the SQL server and can be scheduled by the SQL DBA's with their own scheduler. They would specify the policy and thus the retention.
Remember.....Google is your friend!
I agree - put them in
I agree - put them in different policies.
Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows.
Handy NBU links
Hi, I also agree. You need
Hi,
I also agree. You need each application and Automatic schedule in different polices for each of your retention periods.
So your yearly auto and application backups are in one policy etc
That's well and good, but
That's well and good, but won't Netbackup create duplicate backups then? My understanding is that Netbackup manages the frequencies in a given Policy, as opposed to the Client?
So if today, I create 4 separate policies, one for each Frequency described above, won't all four run this weekend when they are scheduled? Leaving me with a Weekly, Monthly, Quarterly and Yearly back up. And after that, whenever more than one happen to be scheduled, they will run again.
Don't use Automatic schedules
As I mentioned in my first reply, if you only use the Application schedule that is automatically created when you set up the policy (type MS-SQL-Server), then the SQL DBA's will control when the policy is run and NOT NetBackup master server scheduling.
This is a departure from what most NetBackup admins are used to, but trust me, it works. This way it's a user-directed backup and the scheduling is outside of NetBackup control
The SQL admins will run the backup of the appropriate policy and then you will get the retentions that you want based upon the policy that they run.
Remember.....Google is your friend!
Stu52, does your method
require that someone run those manually from the SQL side, or is it automated? I'm not familiar with it, but if it's going to require the SQL Admin to do and manage manually, that's not really any better.
SQL DBA's have their own scheduler
I'm not a SQL DBA, but I have worked with them on this issue. There is a scheduler that is part of SQL server plus they have the option of using the NetBackup GUI on the client to run their SQL backups. In addition they can run them from the command line.
In each case, the SQL DBA would provide the name of the NetBackup policy and also the name of a saved SQL batch (.bch) files which are used as the filelist in the NBU policy.
So, yes, it's automated (and controlled by the SQL DBA on the SQL server)....but the benefit is that it's the DBA's responsibility and not yours. From the standpoint of getting the DBA's involved that is a huge plus. Most DBA's that I've worked with would like that ability.
Remember.....Google is your friend!
I'll talk to the SQL DBA
but it still sounds like it will require hands on management to get the desired result, which defeats the purpose in my opinion. Only means that it's in someone else is doing it.
So, am I correct in my understanding that the only other options are as follows?
If the above is correct, I think I'll go ahead create separate policies and go to the trouble of planning out the "Calendar" scheduling accordingly, so as to avoid running multiples on any given weekend.
Calendar schedules & separate policies
If you absolutely still want to have NetBackup control the SQL backups, then, yes, use separate policies and use calendar scheduling for the automatic schedules.
I was just stating my preference for giving control of the SQL backups over to the SQL admins since they have a vested interest in getting good backups.
Remember.....Google is your friend!
As a follow-up, having trouble with sep. policies
I copied the original Policy that had multiple schedules, then edited each new policy so that it included only one of the desired schedules/retentions. Then I deactivated the original Policy.
The problem is that it appears that for some reason, the new Policies seem to be dependent on the original policy (from which all the new policies were copied), as it must be "Activated" or I get a Status Code 247. Plus it seems to be using the schedule in the original Policy as well, b/c I get a Status Code 199 if not with in the schedule on the original Policy.
What am I missing or doing wrong? Is some rule that you can't "Copy" SQL policies?
To conclude, I contacted support
and they said to restart the services, then test the new policies, which had no effect.
Then they said that the copied Policies must be corrupt, and suggested creating a new policy from scratch (as opposed to copying the original), which did the same thing as the copied policies.
I then checked the .bch files that were called by the policies and it referenced the original Policy as follows:
OPERATION BACKUP
DATABASE $ALL
SQLHOST "acct-srvr-db2"
NBSERVER "BALT-SRVR-NBU"
MAXTRANSFERSIZE 6
BLOCKSIZE 7
POLICY ACCT-SRVR-DB2-MSSQL-BACKUP
OBJECTTYPE TRXLOG
NUMBUFS 2
ENDOPER TRUE
So, the solution was to remove the Policy line (marked in bold). Now all the Policies work as they should.
Would you like to reply?
Login or Register to post your comment.