cancel
Showing results for 
Search instead for 
Did you mean: 

Error running manual backup for SQL Server from NB Server

mfal42
Not applicable

I am trying to create a NB policy and schedule for SQL Server backups.  I have copied a policy from a previously existing policy and, according to my NB Administrator "everything looks ok" (I'm a SQL DBA).  When I run the backup I get the following error:

Status code: 240

"The appropriate schedule was not found in the specified policy. For example, a user backup specified a policy name but no user backup schedule exists in that policy."

Troubleshooter says:

"Try the following:
Specify a different policy or create a schedule of the needed type in the policy. After you make the correction, retry the operation."

However, I'm not sure what I should be setting this for.  As stated, I have created the policy by copying a policy my NB Administrator already created.  The main difference is he created a policy for application backup and I'm trying to set this up for automatic (the application backup is problematic for being able to automatically run backups from the SQL side).

Any information is greatly appreciated.

NBU: 6.5

SQL 2008 R2

1 ACCEPTED SOLUTION

Accepted Solutions

MKT
Level 5
Employee Accredited

For SQL backups, the Automatic backup is the schedule that fires the script defined...that script could fire 1 SQL db backup or 1000, Netbackup doesn't know.  The Automatic schedule is used for 'when' the backup is run and registers the 'success/failure' of the script defined. 

All operations in the script get run as 'user backups' under a Application backup schedule.  The Application backup holds the parameters of each database is being backed up under (retention/storage override).  So, the x database backups defined in the script run under the Application schedule. Add that in and you'll get rid of the 240.  SQL/Oracle/Sybase backups run under this same 'two step' scheudule method.

View solution in original post

2 REPLIES 2

MKT
Level 5
Employee Accredited

For SQL backups, the Automatic backup is the schedule that fires the script defined...that script could fire 1 SQL db backup or 1000, Netbackup doesn't know.  The Automatic schedule is used for 'when' the backup is run and registers the 'success/failure' of the script defined. 

All operations in the script get run as 'user backups' under a Application backup schedule.  The Application backup holds the parameters of each database is being backed up under (retention/storage override).  So, the x database backups defined in the script run under the Application schedule. Add that in and you'll get rid of the 240.  SQL/Oracle/Sybase backups run under this same 'two step' scheudule method.

J_H_Is_gone
Level 6

... you have...

The previous (original) policy was setup to START from the NB console with its schedule.

What is sound like you have done is created the policy - but you are trying to start the job from the client or SQL server (via command line maybe?)

There is a difference -

In the policy you will have a schedule (maybe two one with a short retention and one with a long retention)

When starting a backup from the client via command line (link in a script) it is called a USER backup.

This requires a schedule type of USER in the policy - I bet your schedules are like full or incremental.

You need to change it to type USER and set your window for when you think it should be starting.

then in the script or command line execution of the backup command be sure to reference the NAME of your USER schedule.

NOTE - you don't say if you are trying to backup - SQL backup files from disk or do a live backup of the SQL database - which requires the agent and a polcy type of SQL