Manage shadow Copies of Windows Scerver 2008 efficiently

Source: Internet
Author: User
Tags command line copy

Shadow Copies (Shadow copies) are not features that are available in Windows Server 2008. However, for server system platforms such as Windows Server 2008, the use of shadow copies is more significant. With the shadow copy feature, the administrator can create a copy of the backup on the specified volume, which we can consider as a time snapshot and restore the file to a previous version as needed. Therefore, it can greatly guarantee the security of server data. However, under the graphical interface of the console shadow copy management process is more cumbersome and not efficient, and command line operation is faster and more efficient. Therefore, the command line shadow copy management technology is the administrator must master. Hopefully this article will help you do this.

1, vssadmin tool Introduction

Vssadmin is the tool used in Windows Server 2008 to manage shadow copies. With vssadmin, we are able to manage not only shadow copies on the local system, but also the volumes on them through Remote Desktop logging on to the remote server.

2. Enable Shadow Copies

By default, volumes for Windows Server 2008 systems are enabled for shadow copies. If the shadow copy feature is turned off because of human factors or other reasons, we can start it quickly from the command line. The command format to enable Shadow Copies is "vssadmin add Shadowstorage/for=forvolumespec/on=onvolumespec". where "/for=forvolumespec" specifies that the local volume to enable shadow copies is enabled, and "/on=onvolumespec" specifies that a copy of the specified volume be saved on that volume. Of course, the volume to enable shadow copies and the volumes that hold the copy can be a volume. However, the author suggests that it be more scientific to isolate the practice.

Here's an example, if you want to enable the shadow copy feature on local c disk, and save a copy of the volume to D disk. We can execute the command at the command line "vssadmin add Shadowstorage/for=c:/on=d:". If you execute the command "vssadmin add Shadowstorage/for=e:/on=e:" The shadow copy of E disk is started and its copy is also saved in E disk. (Figure 1)

Enable Shadow Copies

3. Disable Shadow Copies

To disable shadow copies on a volume, you can use the vssadmin delete shadowstorage directly. Note, however, that you cannot disable shadow copies on a target volume until all of the saved snapshot images are deleted. Therefore, we first need to delete all the snapshot images that are saved on the volume, and then perform the Disable shadow copy operation on the volume. Its command format is "vssadmin delete Shadowstorage/for=forvolumespec", where "/for=forvolumespec" specifies the local drive where shadow copies are to be disabled. For example, we want to disable shadow copies on the C disk, you can execute the command "vssadmin delete shadowstorage/for=c:". (Figure 2)

Disabling shadow Copies

4, custom shadow copy maximum storage capacity

When a shadow copy of a disk is enabled, by default it uses the maximum available capacity as the storage space for the replica. There is no doubt that this will cause a great waste of disk space. Moreover, the uncontrolled encroachment of disk space on the server system causes the disk space to be out of control, which will affect the normal operation of other services. Therefore, the author recommends that you must limit the maximum disk space occupied by shadow copies. Here, we will use the "/maxsize" parameter of the Vssadmin tool. This parameter receives a storage unit similar to KB, MB, GB, TB, but the minimum value specified by this value cannot be less than 100MB.

Let's give an example of executing "vssadmin add Shadowstorage/for=d:/on=e:/MAXSIZE=2GB" at the command line. After the command is executed, enable the shadow copy on the D disk, save its copy data in the E disk, and limit the available copy storage space to 2GB. Sometimes we don't have enough shadow copy storage space or too much redundancy, so we can resize the space with the "Resize Shadow" command. This command receives the same parameters as the Add command and must be performed in the same associated store. That is, if the shadow copy storage for disk C uses the D disk, you can change the size of the shadow copy storage space only with the following command "vssadmin add Shadowstorage/for=c:/on=d:/MAXSIZE=5GB". (Figure 3)

Customizing the maximum Volume Shadow copy storage capacity

5. View Shadow copy information

How can we quickly get detailed information about a server where a lot of shadow copies are kept on the local disk? Also very simple, the vssadmin tool provides us with "list shadows" and "list Shadowstorage" two commands. Where "list shadows" displays existing shadow copies on the volume, all shadow copies on the volume are displayed by default. To narrow the scope, we can add the "/for=forvolumespec" parameter to list only the specified volume information, or use the "/shadow=shadowld" parameter to list only specific shadow copy information. Normally, we simply execute the command "vssadmin list Shadows". The list Shadowstorage command is more powerful, and it lists the storage information associated with all shadow copies on the system. Similarly, we can add the parameter "/for=forvolumespec" and "/on=onvolumespec" to specify the target volume or the target shadow copy to limit the output information. (Figure 4)

Viewing shadow copy Information

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.