• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1415
  • Last Modified:

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.
0
wjasiulewicz
Asked:
wjasiulewicz
  • 2
1 Solution
 
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
 
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now