This post is more than 5 years old
4 Posts
0
3099
How to Exclude Specific SQL Server DBs with Wildcard
Hi Everyone,
Is there an easy way to exclude a range of SQL Server databases for a given client? For the backup command, can you pass:
nsrsqlsv -h CT*
for example and exclude DBs starting with the letters "CT"?
Thanks for your help!
-TheCuriousDBA
CarlosRojas
1.7K Posts
1
November 15th, 2015 23:00
Hi thecuriousdba
Wildcrads are not supported when excluding DB's. You have to either use the -h and the names of all DB's you want to exclude (for example -h model -h ,aster, etc) or else you can use the -i option and use a text file that will especify the DB's to be backed up, same as adding those to the saveset field:
-I Specifies a text file that lists multiple SQL Server save sets. The -I option can also be specified with the nsrsqlsv command for the Backup Command field in the NetWorker Administration GUI.
Thank you,
Carlos
MoinMansuri
2 Intern
2 Intern
•
147 Posts
1
November 16th, 2015 03:00
Hi,
You can create Global Directive as below and apply to respective client: and also mention extension as below.
NMC >>>>Configuration>>>>>Directive
Unix:
<< / >>
+skip: *.ldf *.mdf *.ndf *.LDF *.MDF *.NDF *.lck *.LCK *.chk *.CHK
Windows:
<< "C:" >>
+skip: *.ldf *.mdf *.ndf *.LDF *.MDF *.NDF
<< "D:" >>
+skip: *.ldf *.mdf *.ndf *.LDF *.MDF *.NDF
<< "E:" >>
+skip: *.ldf *.mdf *.ndf *.LDF *.MDF *.NDF
.
.
.
.
As per Drives on the client machine add that drives too.
TheCuriousDBA
4 Posts
0
November 16th, 2015 05:00
Thanks Carlos!
ble1
2 Intern
2 Intern
•
14.3K Posts
0
November 17th, 2015 02:00
Moin,
Question here is how to exclude it when doing VDI and not file system backup. Further, "/" on Windows works too and it works for all drives (no point of giving suggestion for UNIX if such thing does not exist on UNIX, right?)