64.4 Restore Mode (img restore)

Use the Restore mode to retrieve an image from a specified location and put it down on a workstation.

You can restore an image of a workstation using either the bash prompt or using the ZENworks Imaging Engine menu. For step-by-step instructions, see Section 60.2, Manually Putting an Image on a Workstation. You can also use the Restore mode to restore an image from a partition on a local (writable) device, such as a hard disk or Jaz drive. For step-by-step instructions, see Section 61.0, Setting Up Disconnected Imaging Operations.

Normally, if the image to be put down is a base image (one created previously by the ZENworks Imaging Engine), all existing partitions except ZENworks Linux and Compaq configuration partitions are removed from all local writable devices (such as hard disks and Jaz drives) before the new image is put down. When the image is put down, the sizes of the original partitions from which the image was taken are preserved if possible. If there is insufficient space, the last partition is sized to fit unless it results in data loss, in which case the ZENworks Imaging Engine denies the requested operation. If there is extra space left after all partitions in the image have been restored to their original sizes, that space is left unpartitioned.

If the image to be put down is an add-on image (one produced from an Application object or created by the Image Explorer (imgexp.exe) utility), or if it’s a base image and you specify the apartition:ppartition parameter, none of the existing physical partitions are removed. Instead, the appropriate partitions are updated with the files from the image. The update process does not remove any existing files or overwrite any existing files of the same names if they are newer.

Restoring add-on images over 4 GB in size is not supported by Desktop Management imaging.

The syntax of this mode depends on whether you retrieve the image from a local device or from an Imaging (proxy) server, as explained in the subsections below:

64.4.1 Restore from Local (img restorel)

Use the Restore from Local mode to retrieve an image from a local device and put it down on the workstation. For more information, see Section 61.0, Setting Up Disconnected Imaging Operations.

Using the bash prompt, the following example explains the syntax and available parameters that you can use with the restorel “restore from local” parameter:

img restorel[pNumber] filepath [sfileset] [apartition:ppartition]

Commands

Table 64-5 Img Restorl Parameters

Parameter

Description

restorel[pNumber]

The partition number (as displayed by img dump) of the local partition to retrieve the image from. It must be a primary FAT16 or FAT32 partition. This partition is not changed by the imaging operation.

If you omit the partition number from this parameter, the image is retrieved from the local ZENworks partition.

filepath

The filename of the image to retrieve, including the .zmg extension (case-sensitive) and the complete path from the root of the partition.

sfileset

The number of the image file set to put down. Valid values are 1 through 10. For information on creating file sets of an image, see Section 59.0, Creating and Restoring Images.

If you omit this parameter, file set 1 is used.

apartition:ppartition

A mapping between a partition in the image archive (apartition) and a target physical partition on the local machine (ppartition). Use this parameter to selectively restore a specific part of the image to a specific local partition.

IMPORTANT:If you use this parameter, none of the existing local partitions are removed, and only the target local partition is updated. The update process does not remove any existing files; however, any existing files of the same names are overwritten. If you want to remove all existing files from the target partition before updating it, first use img pd and img pc to delete and re‑create the partition.

For apartition, use the partition number displayed for the source partition in the Image Explorer (imgexp.exe) utility. For ppartition, use the partition number displayed by img dump for the target partition. The target partition must be a Windows partition. You can repeat this parameter as needed to request multiple selective restorations in a single operation. In doing so, you can apply multiple parts of the image to a single local partition, but you can’t apply the same part of an image to multiple local partitions in a single operation.

Examples

Table 64-6 Img Restorl Examples

Example

Explanation

img restorel8 /imgs/dellnt.zmg

Removes all existing local partitions except the one in slot 8, retrieves the image from imgs/dellnt.zmg in slot 8, and puts down the partitions and contents of that image on the available local writable devices. (This example assumes that there is sufficient local space and that slot 8 contains a primary FAT16 or FAT32 partition.)

img restorel /imgs/dellnt.zmg

Removes all existing local partitions, retrieves the image from imgs/dellnt.zmg in the ZENworks partition, and puts down the partitions and contents of that image on the available local writable devices, if there is sufficient space.

img restorel /imgs/dellnt.zmg s2

Removes all existing local partitions, retrieves the image from imgs/dellnt.zmg in the ZENworks partition, and puts down the partitions and contents of file set 2 of that image on the available local writable devices, if there is sufficient space.

img restorel /imgs/dellnt.zmg a2:p1 a3:p1

Retrieves the image from imgs/dellnt.zmg in the ZENworks partition, updates local partition 1 with the data from partitions 2 and 3 of that image, and leaves the other local partitions unchanged, if there is sufficient space in local partition 1.

64.4.2 Restore from Proxy (img restorep)

Use the Restore from Proxy mode to retrieve an image from an Imaging (proxy) server and put it down on the workstation. For more information, see Section 60.2, Manually Putting an Image on a Workstation.

Using the bash prompt, the following example explains the syntax and available parameters that you can use with the restorep “restore from proxy” parameter:

img restorep address filepath [sfileset] [apartition:ppartition]

Commands

Table 64-7 Img Restorp Parameters

Parameter

Description

address

The IP address or DNS name of the ZENworks Imaging server to retrieve the image from. This can be any server running the Imaging Proxy service.

filepath

The UNC path to the image file to retrieve, including the image filename and the .zmg extension (case-sensitive). The format of the UNC path is as follows:

//servername/volume_or_share/path_to_store_images/imagename.zmg

For OES Linux, the path to the image file must be from root (/). For example, the path might look like:

//servername/media/nss/NSS_volume/path_to_image/imagefilename.zmg

Upon execution of img restorep at the cmd line, the servername portion of this path is replaced with the value in the address portion of this syntax.

IMPORTANT:Because Linux doesn’t recognize backslashes, you must use forward slashes in the UNC path or enclose the entire path in quotes.

sfileset

The number of the image file set to put down. Valid values are 1 through 10. For information on creating file sets of an image, see Section 59.0, Creating and Restoring Images.

If you omit this parameter, file set 1 is used.

apartition:ppartition

A mapping between a partition in the image archive (apartition) and a target physical partition on the local machine (ppartition). Use this parameter to selectively restore a specific part of the image to a specific local partition.

IMPORTANT:If you use this parameter, none of the existing local partitions are removed, and only the target local partition is updated. The update process does not remove any existing files or overwrite any existing files of the same names if they are newer. If you want to remove all existing files from the target partition before updating it, first use the Partition Mode (img p) to delete and re‑create the partition.

For apartition, use the partition number displayed for the source partition in the Image Explorer (imgexp.exe) utility. For ppartition, use the partition number displayed by img dump for the target partition. The target partition must be a Windows partition. You can repeat this parameter as needed to request multiple selective restorations in a single operation. In doing so, you can apply multiple parts of the image to a single local partition, but you can’t apply the same part of an image to multiple local partitions in a single operation.

Examples

Table 64-8 Img Restorp Examples

Example

Explanation

img restorep 137.65.95.127 //xyz_server/sys/imgs/dellnt.zmg

Removes all existing local partitions, retrieves the image from sys/imgs/dellnt.zmg on xyz_server, and puts down the partitions and contents of that image on the available local writable devices. (This example assumes that there is sufficient local space and that 137.65.95.127 is the IP address of xyz_server.)

img restorep img.xyz.com //xyz_server/sys/imgs/dellnt.zmg s2

Removes all existing local partitions, retrieves the image from sys/imgs/dellnt.zmg on xyz_server, and puts down the partitions and contents of file set 2 of that image on the available local writable devices. (This example assumes that there is sufficient local space and that img.xyz.com is the DNS name of xyz_server.)

img restorep img.xyz.com //xyz_server/sys/imgs/dellnt.zmg a2:p1

Retrieves the image from sys/imgs/dellnt.zmg on xyz_server, updates local partition 1 with the data from partition 2 of that image, and leaves the other local partitions unchanged. (This example assumes that there is sufficient space in local partition 1 and that img.xyz.com is the DNS name of xyz_server.)

img restorep img.xyz.com //bogus/sys/imgs/dellnt.zmg

Removes all existing local partitions, retrieves the image from sys/imgs/dellnt.zmg on img.xyz.com, and puts down the partitions and contents of that image on the available local writable devices. (This example assumes that there is sufficient local space, and that img.xyz.com is the DNS name of a server running the Imaging Proxy).

Because the servername inside the UNC path is replaced by the address value defined earlier in the cmd line, //bogus becomes //img.xyz.com