AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systems

Restore an image to file

When you back up an image, Tivoli® Storage Manager backs up the first sector of the volume, but when the data is restored, it skips the first sector to preserve the original logical volume control block of the destination volume.

When you restore an image to file, entire volume contents, including the first sector, are restored to the file.

AIX® LVM volumes from original volume groups contain the Logical Volume Control Block (LVCB) on the first sector (512 bytes) of the volume. The LVCB contains volume specific meta-data that should be preserved by applications using the volume.

When you copy the file, containing the image, onto an LVM volume from the original volume group, you need to skip the LVCB from both the file and destination volume. The following dd command can be used for this purpose.

  dd if=<filename> of=/dev/<vol> bs=512 skip=1 seek=1

The dd command sets the block size to 512 bytes, which makes copying very slow. It is better to use bs=1m or similar. Here is an alternative way to copy image data:

  1. Save the original first sector to a file:
    dd if=/dev/<vol> of=firstblk.tmp bs=512 count=1
  2. Copy the restored image:
    dd if=<filename> of=/dev/<vol> bs=1m
  3. Restore the original first sector:
    dd if=firstblk.tmp of=/dev/<vol> bs=512 count=1

With the introduction of big and scalable volume group formats on AIX, it is possible that the first sector of the logical volume cannot contain LVCB and is available for the data. If you use big or scalable volume groups on your system, and need to restore the whole volume including the first sector, restore the volume to file and then copy it to a destination volume. The following dd command can be used for this purpose.

dd if=<filename> of=/dev/<vol> bs=1m