W2008R2 WBADMIN command line -exclude is being ignored

WBAdmin.exe
 START BACKUP
 -backupTarget:X:
 -include:C:
 -exclude:D:,X:
 -allCritical
 -systemState
 -vssCopy
 -quiet

Even though the above command includes -exclude, Windows is still trying to include the D: and X: drives in the backup.

If I remove -exclude, it seems to run successfully and only processes the drives specified in -include, but I want to explicitly specify the drives I don't want backed up.
wjasiulewiczAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Carol ChisholmCommented:
Missing a backslash
".... it should be terminated with a backslash (\). "

http://technet.microsoft.com/en-us/library/cc742083.aspx
0
Carol ChisholmCommented:
It may also be that excluding the target is a problem. If you do this in the GUI it causes user interaction, which might not be done in the command line.
 -exclude:D:

WBADMIN checks that you are not trying to backup the target.
0
David Johnson, CD, MVPOwnerCommented:
you don't need the -exclude since the excluded drives are not in the 'included' drives
include c:
-exclude:"c:\$Recycle Bin","c:\SystemVolumeinformation"
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
wjasiulewiczAuthor Commented:
The backslash is only required when using a GUID-based volume.

http://technet.microsoft.com/en-us/library/cc742083.aspx

"If you use a GUID-based volume name, it should be terminated with a backslash (\)"

Basically, I think I'm going to just leave -exclude out of the backup script, but you'd think they'd have resolved any problems using it by now.

I was wanting to include -exclude more for the purpose of explicitly letting other administrators know that the script was not intended to backup those drives and force Windows to never back them up, but it does appear that -include is sufficient to accomplish that purpose as far as Microsoft is concerned; I'll accomplish the same thing by including comments in the script instead.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.