Veritas System Recovery 16 Automation - THIS SCRIPTING DOCUMENTATION IS PROVIDED IN CONJUNCTION WITH YOUR LICENSE FOR VERITAS SYSTEM RECOVERY SOFTWARE PRODUCTS, AND MAY BE USED ONLY IN CONJUNCTION WITH THAT SOFTWARE, UNDER THE TERMS OF THE END USER LICENSE AGREEMENT THAT ACCOMPANIED THE SOFTWARE. THIS SCRIPTING DOCUMENTATION IS PROPRIETARY VERITAS PROPERTY. YOU MAY NOT COPY, DISTRIBUTE, LICENSE OR SUBLICENSE THE SCRIPTING DOCUMENTATION.
CopyVolume.ps1 Example Script

Description: Copy a specific volume to unallocated space.
Version: 11.1
View Script
Objects Used
ProtectorAuto Central automation object for accessing VProRecovery functionality.
CopyJob Information used to copy a volume to another volume or to unallocated space.
Destination A possible restore or copy destination (existing volume, unallocated space, etc.).
Remarks

This script creates a copy of the system volume to unallocated space by connecting to the VProRecovery agent on the local computer and providing a CopyJob object with the appropriate properties.

Steps:

  1. Create a new instance of the ProtectorAuto object.
  2. Use the Connect method of the ProtectorAuto object to initiate a connection to the agent on a specific computer. Although this script connects to the agent on the local computer, any computer with the agent installed can be connected to by providing that computer's name or IP address.
  3. Enumerate the available volumes to find the volume to be copied. This script copies the system volume.
  4. Enumerate the available copy destinations to find the destination to copy the volume to. This script selects the first unallocated space large enough to hold the copy. Alternatively, an existing volume can be used as the destination by selecting the destination with the desired MountPoint property (for example, D:\).
  5. Create a CopyJob object, specifying its properties to support the desired options, including the volume and destination found in the previous steps.
  6. Create a copy of the volume by sending the CopyJob to the CopyVolume method.

Home

Copyright © 2005-2016 Veritas Technologies LLC. All Rights Reserved.