


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.
The account that runs the backup-archive client must have administrator
authority to successfully perform any type of image restore.

Using the incremental option with the
restore image command to perform a dynamic image backup is not supported.- 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.


Considerations:- The API must be installed to use the restore image command.
Image restore is not supported for the Sun QFS file system.
Image restore is not supported for GPFS
file systems on Linux x86_64, Linux on POWER® and Linux on System z®.
On 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.
Considerations: - 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


This option is
valid for AIX®, Linux,
and Oracle Solaris clients.
This command is valid for all Windows clients.
Syntax
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.


destinationfilespec

Specifies 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.
destinationfilespec
Specifies 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.
| Option | Where to use |
|---|---|
| backupsetname | Command line only. |
![]() ![]() dateformat
|
![]() ![]() Client user option file (dsm.opt) or command
line. |
dateformat
|
Client option file (dsm.opt) or command
line. |
| deletefiles | Command line only. |
| fromnode | Command line only. |
![]() ![]() fromowner
|
![]() ![]() Command 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. |
![]() ![]() timeformat
|
![]() ![]() Client user option file (dsm.opt) or command
line. |
timeformat
|
Client option file (dsm.opt) or command
line. |
| verifyimage | Command line only. |


The 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:
The 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.


If 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.
If 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


Task

Restore the /home/testdirectory over which the logical volume is mounted, to its original location.Command:
dsmc rest image /home/test
Task
Restore the e:drive to its original location.Command:
dsmc rest image e:

Task

Restore the /home/projdirectory 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
Task
Restore 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

Task

Restore the /usrfile 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
Task
Restore 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

Task

If bad sectors present on the target volume, use the imagetofile option to
restore the /usrfile system to the/home/usr.imgfile to avoid data corruption.Command:
dsmc restore image /usr /home/usr.img -imagetofile
Task
If bad sectors present on the target volume, use the imagetofile option to
restore the d:drive to thee:\diskD.imgfile to avoid data corruption.Command:
dsmc restore image d: e:\diskD.img -imagetofile
Task
Restore the e:drive from the backup setweekly_backup_data.12345678to its original location.Command:
restore image e: -backupsetname=weekly_backup_data.12345678
