Jump to content
Sburk

Exclude file name selectors not working

Recommended Posts

I have a backup script that basically backs up entire drives on several different computers.

 

I noticed that it was attempting to backup mssql file extensions .mdf and .ldf which is causing roughly 130 errors upon backup completion.

 

I added two exclude by name selectors:

 

*.mdf

*.ldf

 

In the operations log it is still showing that the script is attempting to backup files with the above extensions. So, I'm still getting 130 errors upon completion. I have included a couple screenshots of the selector setup....the *.mdf and *.ldf selectors are setup exactly the same.

 

Any ideas ladies and gentlemen?

 

Thanks!

 

Edited by Guest

Share this post


Link to post
Share on other sites

Seems like you are doing it right, but have you tried instead:

"file name ends with .mdf" or

"file name ends with .ldf"

 

Also, what are the errors?

 

Russ

Share this post


Link to post
Share on other sites

The errors are all

 

...\mssql\data\filename.mdf: can't read, error -1020 (sharing violation)

...\mssql\data\filename.ldf: can't read, error -1020 (sharing violation)

 

Which I think is by design since the sql server is running.

 

I will give your suggestion on the selectors a shot. I'll know if it worked by tomorrow morning and will report back.

 

Thanks!

Share this post


Link to post
Share on other sites

A couple suggestions:

1) I have had better luck with "Windows file name ends with .ldf", rather than "file name ends with .ldf".

2) Also, you could try "Windows file or folder starts with "c:\mssql\data\" (or whatever).

 

It's faster to check if your selector is working with the Check Selector feature, rather than running a backup.

 

Share this post


Link to post
Share on other sites

I tried your suggestions and still no joy.

 

Excuse my ignorance, but when I run the "check selector" tool, it appears to just pull up an entire list of the entire source drive. I drill down to find a .mdf or a .ldf and both are still selected. Is this expected??

Share this post


Link to post
Share on other sites
Excuse my ignorance, but when I run the "check selector" tool, it appears to just pull up an entire list of the entire source drive. I drill down to find a .mdf or a .ldf and both are still selected. Is this expected??

Yes and No. You should expect a list of all files and folders. Some files/folders should be selected, but not others. The fact that .mdf and .ldf are still selected means your selector doesn't work.

Share this post


Link to post
Share on other sites

Recently we used a wildcard (*) in a selector and that didn't work. Only when we entered the full blown path it worked. So it seems to me the (*) wildcard doesn't (always?) work.

 

Could be a bug?

 

B.t.w., we use 7.6.123 Multi Server.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×