Unsolved

This post is more than 5 years old

3 Posts

1765

November 6th, 2014 08:00

Exclude read-only DB from SQL backup

We use the Networker SQL Agent.  I want to exclude several large read-only SQL databases from our nightly full backup.  Is there a switch that can exclude read-only db's?  Or how about a wildcard search?  All of the databases that I want to exclude have the word "Snapshot" in the name.  Is there a way to get this done?

2 Intern

 • 

14.3K Posts

November 6th, 2014 10:00

You must list them manually and skip them with -h parameter.

3 Posts

November 6th, 2014 11:00

Thanks for your reply

Problem is there are about 50 databases and the names change as new snapshots are created and older snapshots age off and get removed.

I wonder is there a limit to how many databases can be excluded with the -h parameter?  Maybe I can programmatically construct a command line each day as the DB names change?

3 Posts

November 6th, 2014 12:00

These are DBs used for reporting.  Each night various tables from our AS400 are exported to a SQL database that is created and named xxxxSnapshotyyyymmdd.  We have a process that removes older databases according to a retention schedule  - like 10 Daily, 5 Fridays, 13 monthly, etc.

These snapshot databases are fairly large ~50gb.  At times it may take nearly 12 hrs to do a full backup of all DBs on the prod server and that is causing issues with other production processes that must run overnight.  Since these snapshots are read-only and they get replicated to our DR site, I see no need to back them up each night from the production server.  If I could eliminate them from the nightly backup, the backup window would shrink dramatically and not interfere with the other nightly jobs.  I could do periodic backups of these snapshots from the DR location.  The non-snapshot DBs do not get replicated to the DR server, so I still need to backup them up from the prod server.

2 Intern

 • 

14.3K Posts

November 6th, 2014 12:00

Can you elaborate this snapshot business?

4 Operator

 • 

1.3K Posts

November 6th, 2014 23:00

So you already know which DB's are getting replicated to the DR site and which are not or do the non replicating DB names keep changing too. If the DB's names are static and do not change then it would be best o list the DB names as in the saveset list and backup only the required DB's, but in case the DB names keep changing then you could build a script that would get the current set of non replicating DB's and update the saveset list of the respective client resource in NetWorker.

155 Posts

November 18th, 2014 12:00

As suggested by Crazyrov, it would be a good idea to polulate saveset list with the Prod DBs u are more concerned about.
You can also use -I option to pass on saveset list in form of a file to nsrsqlsv command containing DB you need to Backup.

No Events found!

Top