Tag Archives: wbadmin

Fixed – “The filename, directory name, or volume label syntax is incorrect" when you add a hard drive to Windows 2008 R2 backup

Apparently, according to Microsoft KB Article 2009365 this issue occurs when a previously hard drive (or the only previously defined) hard drive has been removed from the server and a new drive is being attached. This is typically the case when setting up a new server and preconfiguring the backups to go to the second identical usb drive. Most people are just going to unplug the drive leaving the old power supply and usb cable attached to the server and power and plug in the new drive and then attempt to add it to the backup schedule. At this point the backup program will give the error “The filename, directory name, or volume label syntax is incorrect” as the old drive is no longer attached. Microsoft have a couple of solutions, including adding the first drive back to the server, or removing the first drive. Neither of which are very helpful if you are just swapping the external drive itself. The final solution is to add the drives from an elevated command line using the following.

  1. Run the following command from an elevated command prompt to determine the Disk Identifier of the new disk:
    wbadmin get disks
  2. Based on the output, locate the disk that will be added to the scheduled backup. Make a note of the Disk Identifier. The output will resemble the following:
    Disk name: xxxxxxxxxxx
    Disk number: x
    Disk identifier: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
    Total space: xxx.xx GB
    Used space : xxx.xx GB
  3. Run the following command to add the new disk to the Scheduled backup. Use the Disk Identifier from the previous step as the "AddTarget" parameter.
    WBADMIN ENABLE BACKUP -addtarget:{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
  4. When you receive the following prompt, type Y for Yes.

"Do you want to enable scheduled backups with the above settings?"

5. You may be prompted to format the drive if it was previously used in another server or for another purpose.

The screenshot below shows the addition of a USB drive to my virtualised SBS server.

image