Windows operating systemsOracle Solaris operating systemsLinux operating systemsAIX operating systems

Restore Image

The restore image command restores a file system or raw volume image that was backed up using the backup image command.

The restore obtains the backup image from the IBM Spectrum Protect server, or inside a backup set from the IBM Spectrum Protect server, when the backupsetname option is specified. This command can restore an active base image, or a point-in-time base image, with associated incremental updates.

Note:
  1. Windows operating systemsThe account that runs the backup-archive client must have administrator authority to successfully perform any type of image restore.
  2. Oracle Solaris operating systemsLinux operating systemsAIX operating systemsUsing the incremental option with the restore image command to perform a dynamic image backup is not supported.
  3. If you use IBM Spectrum Protect HSM for Windows or IBM Spectrum Protect for Space Management, and you restore a file system image backup and plan to run reconciliation, you must restore the files that were backed up after the image backup. Otherwise, migrated files that were created after the image backup expire from the HSM archive storage on the IBM Spectrum Protect server.

You can use the verifyimage option with the restore image command to specify that you want to enable detection of bad sectors on the destination target volume. If bad sectors are detected on the target volume, teh client issues a warning message on the console and in the error log.

If bad sectors are present on the target volume, you can use the imagetofile option with the restore image command to specify that you want to restore the source image to a file. Later, you can use a data copy utility of your choice to transfer the image from the file to a disk volume.

Oracle Solaris operating systemsLinux operating systemsAIX operating systemsConsiderations:
  • The API must be installed to use the restore image command.
  • Oracle Solaris operating systemsImage restore is not supported for the Sun QFS file system.
  • Linux operating systemsImage restore is not supported for GPFS file systems on Linux x86_64, Linux on POWER® and Linux on System z®.
  • Linux operating systemsOn Linux systems, some file systems such as ext2, ext3, ext4, btrfs, and xfs use a universally unique identifier (UUID) to identify themselves to the operating system. If you create an image backup of such a volume and you restore it to a different location, you might have two volumes with the same UUID. If you use UUID to define your file systems in /etc/fstab, be aware that the backup-archive client might be unable to correctly mount the restored file system because the UUIDs conflict. To avoid this situation, restore the image to its original location. If you must restore it to a different location, change the UUID of either the original or restored volume before you mount the restored file system. Refer to the Linux documentation for instructions on how to change a UUID. You might also need to manually edit the /etc/fstab file so the original volume, the restored volume, or both volumes can be mounted.
  • If you use the pick option, the following information is displayed for file system images that were backed up by the client:
    • Image Size
    • Stored Size - This value is the actual image size that is stored on the IBM Spectrum Protect server. The stored image on the server is the same size as the volume capacity.
    • File system type
    • Backup date and time
    • Management class that is assigned to image backups
    • Whether the image backup is an active or inactive copy
    • The image name
  • If for some reason a restored image is corrupted, you can use the fsck tool to attempt to repair the image.
Windows operating systemsConsiderations:
  • The IBM Spectrum Protect API must be installed to use the restore image command.
  • You can restore an NTFS or ReFS file system to a FAT32 volume or vice versa.
  • The destination volume to which you restore must exist and be the same size or larger than the source volume.
  • The physical layout of the target volume (striped, mirrored) can differ.
  • The target volume is overwritten with data contained in the image backup.
  • You do not have to format a target volume before you restore an image backup that contains a file system.
  • The client requires an exclusive lock to destination volume you are restoring. The client locks, restores, unlocks, unmounts, and mounts the volume during a restore operation. During the restore process, the destination volume is not available to other applications.
  • If you use the pick option, the following information is displayed for file system images that are backed up by the client:
    • Image Size
    • Stored Size - This value is the actual image size that is stored on the server. The imagegapsize option can be set so only used blocks in a file system are backed up. So, the stored image size on the server might be smaller than the volume size. For online image backups, the stored image can be larger than the file system based on the size of the cache files.
    • File system type
    • Backup date and time
    • Management class that is assigned to image backup
    • Whether the image backup is an active or inactive copy
    • The image name
  • If a restored image is corrupted, use the chkdsk utility to check for and repair any bad sectors or data inconsistencies (unless the restored volume is RAW).

Supported Clients

Oracle Solaris operating systemsLinux operating systemsAIX operating systemsThis option is valid for AIX®, Linux, and Oracle Solaris clients.

Windows operating systemsThis command is valid for all Windows clients.

Syntax

Read syntax diagramSkip visual syntax diagram REStore Image  options sourcefilespec "sourcefilespec" destinationfilespec

Parameters

sourcefilespec
Specifies the name of a source image file system to be restored. Only a single source image can be specified; you cannot use wildcard characters.
Oracle Solaris operating systemsLinux operating systemsAIX operating systemsdestinationfilespec
Oracle Solaris operating systemsLinux operating systemsAIX operating systemsSpecifies the name of an existing mounted file system or the path and file name to which the source file system is restored. The default is the original location of the file system.
Windows operating systemsdestinationfilespec
Windows operating systemsSpecifies the name of an existing mounted file system or the path and file name to which the source file system is restored. The default is the original location of the file system. You can restore an NTFS or ReFS file system to a FAT32 volume or vice versa.
Table 1. Restore Image command: Related options
Option Where to use
backupsetname Command line only.
Oracle Solaris operating systemsLinux operating systemsAIX operating systemsdateformat Oracle Solaris operating systemsLinux operating systemsAIX operating systemsClient user option file (dsm.opt) or command line.
Windows operating systemsdateformat Windows operating systemsClient option file (dsm.opt) or command line.
deletefiles Command line only.
fromnode Command line only.
Oracle Solaris operating systemsLinux operating systemsAIX operating systemsfromowner Oracle Solaris operating systemsLinux operating systemsAIX operating systemsCommand line only.
imagetofile Command line only.
inactive Command line only.
incremental Command line only.
noprompt Command line only.
pick Command line only.
pitdate Command line only.
pittime Command line only.
Oracle Solaris operating systemsLinux operating systemsAIX operating systemstimeformat Oracle Solaris operating systemsLinux operating systemsAIX operating systemsClient user option file (dsm.opt) or command line.
Windows operating systemstimeformat Windows operating systemsClient option file (dsm.opt) or command line.
verifyimage Command line only.

Oracle Solaris operating systemsLinux operating systemsAIX operating systemsThe restore image command does not define or mount the destination file space. The destination volume must exist, must be large enough to hold the source, and if it contains a file system, must be mounted. If an image backup contains a file system, and you restore them to a different location, be aware of the following points:

Windows operating systemsThe restore image command does not define or mount the destination file space. The destination volume must exist, must be large enough to hold the source, and if it contains a file system, must be mounted. The destination volume must be mapped to a drive letter. If an image backup contains a file system, and you restore them to a different location, be aware of the following points:

  • If the destination volume is smaller than the source volume, the operation fails.
  • Oracle Solaris operating systemsLinux operating systemsAIX operating systemsIf the destination volume is larger than the source, after the restore operation you lose the difference between the sizes. The lost space can be recovered by increasing the size of the volume, which also increases the size of the restored volume.
  • Windows operating systemsIf the destination volume is larger than the source, after the restore operation you lose the difference between the sizes. If the destination volume is on a dynamic disk, the lost space can be recovered by increasing the size of the volume. Increasing the size of the volume also increases the size of the restored volume.

Examples

Oracle Solaris operating systemsLinux operating systemsAIX operating systemsTask
Oracle Solaris operating systemsLinux operating systemsAIX operating systemsRestore the /home/test directory over which the logical volume is mounted, to its original location.

Command: dsmc rest image /home/test

Windows operating systemsTask
Windows operating systemsRestore the e: drive to its original location.

Command: dsmc rest image e:

Oracle Solaris operating systemsLinux operating systemsAIX operating systemsTask
Oracle Solaris operating systemsLinux operating systemsAIX operating systemsRestore the /home/proj directory over which the logical volume is mounted, to its original location and apply the changes from the last incremental backup of the original image that is recorded on the server. The changes include deletion of files.

Command: dsmc restore image /home/proj -incremental -deletefiles

Windows operating systemsTask
Windows operating systemsRestore the h: drive to its original location and apply the changes from the last incremental backup of the original image that is recorded on the server. The changes include deletion of files.

Command: dsmc restore image h: -incremental -deletefiles

Oracle Solaris operating systemsLinux operating systemsAIX operating systemsTask
Oracle Solaris operating systemsLinux operating systemsAIX operating systemsRestore the /usr file system to its original location. Use the verifyimage option to enable detection of bad sectors on the target volume.

Command: dsmc restore image /usr -verifyimage

Windows operating systemsTask
Windows operating systemsRestore the d: drive to its original location. Use the verifyimage option to enable detection of bad sectors on the target volume.

Command: dsmc restore image d: -verifyimage

Oracle Solaris operating systemsLinux operating systemsAIX operating systemsTask
Oracle Solaris operating systemsLinux operating systemsAIX operating systemsIf bad sectors present on the target volume, use the imagetofile option to restore the /usr file system to the /home/usr.img file to avoid data corruption.

Command: dsmc restore image /usr /home/usr.img -imagetofile

Windows operating systemsTask
Windows operating systemsIf bad sectors present on the target volume, use the imagetofile option to restore the d: drive to the e:\diskD.img file to avoid data corruption.

Command: dsmc restore image d: e:\diskD.img -imagetofile

Windows operating systemsTask
Windows operating systemsRestore the e: drive from the backup set weekly_backup_data.12345678 to its original location.

Command: restore image e: -backupsetname=weekly_backup_data.12345678