Aug
12

Configure Shadow Copies on Server Core

Filed Under (Server Core) by on 12-08-2008

This article is intended to help those people that have a need to configure Shadow Copies on a Server Core install.  Server Core installs by default with the File Server role enabled.  Because of this you don’t have to install any additional role or feature.  vssadmin is the command that is used to configure Shadow Copies.

As far as I can tell once this is enabled it does not create any scheduled tasks to reoccur.  Which means you have to either create a manual snapshot (pretty easy) or schedule the task to occur (not as easy in Server Core).

To turn on Shadow Copies for a volume:

vssadmin add shadowstorage /for=c: /on=c: /maxsize=1gb

/for= which volume you want to enable Shadow Copies on
/on= which volume you want to store Shadow Copies on
/maxsize= this is how much space you are going to use for Shadow Copies (300MB min and KB, MB, GB, TB, PB and EB can all be used)

To create a manual snapshot:

vssadmin create shadow /for=c:

To remove Shadow Copies for a volume:

vssadmin delete shadowstorage /for=c: /on=c:

If you need to schedule this type of event (and you really should) you will want to create a new task in Server Core.  To do so you must use the schtasks command.  I’m by no means an expert in using that command but below I have a sample command that I use to schedule a daily snapshot to occur at 13:30 every day.

schtasks /create /SC daily /TN Afternoon_Snapshot /TR “c:vssadmin create shadow /for=c” /ST 13:30

————————————————————————————————

Below you find more of the commands that are associated with the vssadmin command:

List Providers

This lists Volume Shadow Copy providers configured on the system.

List Shadows

This lists volume shadow copies that are stored on a system.

List ShadowStorage

This statement lists Volume Shadow Copy storage areas.

List Writers

List Writers lists Volume Shadow Copy writers known to the system.

List Volumes

This command lists system volumes that are eligible for shadow copies.

Query Reverts

This command queries the status of in-progress revert operations.

Revert Shadow

This command reverts a volume to a shadow copy. It uses the following:

  • “Shadow=ShadowId [/Quiet]” specifies a shadow to be reverted.
  • “ForceDismount” forces the volume to be dismounted if files are in use when the revert process is tried.

Delete Shadows

This option deletes one or more volume shadow copies.

  • “For=ForVolumeSpec [/Oldest] [/Quiet]” deletes shadow copies for a specified volume. /Oldest choose the oldest shadow copy. /Quiet performs the deletion with no visible messages or warnings.
  • “Shadow=ShadowId [/Quiet]” specifies a shadow to be deleted. You will need to specify the full shadow ID (a very long string of Hexadecimal numbers, which can be obtained from the List Shadows command.
  • “All” deletes all shadow copies on the system.

Resize ShadowStorage

This command resizes a Volume Shadow Copy storage area and has the following options:

  • “For” specifies the volume for which the designated shadow copy storage area is maintained.
  • “On” designates the storage area that is to be resized.
  • “MaxSize” sets the maximum size for the shadow copy storage area. Specify MB, GB, TB, PB,,, or EB.


2 Responses to “Configure Shadow Copies on Server Core”

  1.   Horváth Csaba Says:

    Hi,

    obviously turning on shadow copy instead of ‘delete’ you shall use ‘add’.

    e.g. vssadmin add shadowstorage /for=c: /on=c: /maxsize=1gb

    Reply

  2.   BrianM Says:

    Good catch!

    Reply

Leave a Reply