IBM Support

Saving and Restoring an Image Catalog and Its Images to Another System

Troubleshooting


Problem

This document explains how to move image catalogs to other systems. There are two methods listed below.

Resolving The Problem

This document explains how to move image catalogs to other systems. There are two methods listed below.

1. Saving an Image Catalog and Its Images

Note: Ensure that the image catalog is unloaded from the device before saving. To find the directory of the image catalog, WRKIMGCLGE imagecatalogxx. If saving to save file, pre-create two save files on both the target and source systems using the CRTSAVF command as listed in the example steps below. Individual device descriptions cannot be saved; however, you can create virtual devices on the target system using the CRTDEVOPT or CRTDEVTAP command and specifying the resource name as *VRT.

1.To save the image catalog object, perform the following steps:
A) CRTSAVF FILE(QGPL/IMGCLGOBJ)
    Note: Create the save file on both the target and on the source system

B) SAVOBJ OBJ(imagecatalogxx) LIB(QUSRSYS) DEV(*SAVF) OBJTYPE(*IMGCLG) SAVF(QGPL/IMGCLGOBJ) TGTRLS(<SEE NOTE BELOW>)
    where imagecatalogxx is the name of the image catalog being saved.

    Note: If you will be restoring the image catalog to a system at an earlier release of the operating system be sure to use Target release on your save command and specify the release your restoring to. You can only go back two release levels.
2.To save the images for the catalog, on the operating system command line type the following:
A) CRTSAVF FILE(QGPL/IMGCLGDIR)
    Note: Create the save file on both the target and on the source system

B) SAV DEV('/QSYS.LIB/QGPL.LIB/IMGCLGDIR.FILE') OBJ('/imgcatalogdirectory') TGTRLS(<SEE NOTE 2 BELOW>)
    where imgcatalogdirectory is the name of the image catalog directory where the images reside.

Note: If Step 2B) SAV DEV('/QSYS.LIB/QGPL.LIB/IMGCLGDIR.FILE') OBJ('/imagedirectory') fails with message CPD3775 (Cannot save or restore /imagedirectory/imagefile), you should issue the following command:
    CHGATR OBJ('/imagedirectory') ATR(*ALWSAV) VALUE(*YES) SUBTREE(*ALL)

Note 2: If you will be restoring the image catalog to a system at an earlier release of the operating system be sure to use Target release on your save command and specify the release your restoring to. You can only go back two release levels.
2. Transporting Virtual Storage

After saving the image catalog object and the image catalog directory with its images, you can transport them to another system using one of the following methods:

o FTP
o IBM i Navigator
o QFilesvr.400
o OptiConnect
o ObjectConnect
o Save/Restore using physical media
o NetServer shares


3. Restoring an Image Catalog and Its Images

To restore an image catalog and its images to another system, do the following:
1.To restore the image catalog to the target system, on the operating system command line type the following:

RSTOBJ OBJ(imagecatalog) SAVLIB(QUSRSYS) DEV(*SAVF) OBJTYPE(*IMGCLG) SAVF(QGPL/IMGCLGOBJ) MBROPT(*ALL) ALWOBJDIF(*ALL)

Press the Enter key.
2.To restore the images to the same directory associated with the image catalog, on the operating system command line type the following:

RST DEV('/QSYS.LIB/QGPL.LIB/IMGCLGDIR.FILE') OBJ('/imagedirectory')

Press the Enter key.

Notes:
a If using ObjectConnect or FTP, the directory must exist before the objects can be restored.
b Running the VFYIMGCLG command against restored images is recommended.
c If the target system is at a previous release, specify the release in the TGTRLS parameter.
d If restoring a R530 (or above) image catalog to a R520 system, only the first 64 indexes are recognized..
e If this is saved or restored using a physical device, the device parameter is similar to: DEV('/QSYS.LIB/TAPxx.DEVD')

*** END OF STEPS ***


Alternate Method

FTPing Images Without Saving/Restoring and then Re-Creating the Image Catalog Object

These commands are run on the target system where you want to move the images to. The image catalog object (type *IMGCLG) will need to be re-created because it cannot be FTPed.

Note: The directory where you are putting the images must exist on the target system. It is the directory that you specify in the 'LCD...' command below.

o Start an FTP session with a remote system where the image files exist: FTP RMTSYS(remote-system)
o Set the file naming format: NAMEFMT 1
o Set the remote directory: CD '/directory-name'
o Set the local directory: LCD '/directory-name'
o Issue the BINARY command to set the transfer type: BINARY
o Issue the MGET command to get the image files from the remote system: MGET * <<=== Assumes you want all files from the directory on the source system. If you do not want them all, you can use 'GET filename.extension' to retrieve specific files from the directory on the source system.
o Quit the FTP session: QUIT


To re-create the image catalog and add the images back into the catalog, do the following:
1.To create the image catalog, on the operating system command line type the following:

CRTIMGCLG IMGCLG(imagecatalogxx) DIR('/imagedirectory')

Press the Enter key.
2.To add the catalog entries from images that were restored, on the operating system command line type the following:

ADDIMGCLGE IMGCLG(imagecatalogxx) FROMFILE('imagefile') TOFILE(*FROMFILE)

where the 'imagefile' is the image that was restored to '/imagedirectory' in the section "Restoring an Image Catalog and Its Images, for example, I_BASE_O1, B2924_01, and so on).
3.Repeat Step 2 for each image in the directory.

Note: Steps 1 through 3 must not be performed if you have previously restored the image catalog object using the following command:

RSTOBJ OBJ(imagecatalog) SAVLIB(QUSRSYS) DEV(device) OBJTYPE(*IMGCLG) MBROPT(*ALL) ALWOBJDIF(*ALL).
4.To load the image catalog, on the operating system command line type the following:

LODIMGCLG IMGCLG(imagecatalogxx) DEV(virtualopticaldevice)

Press the Enter key.
5.To verify the image catalog, on the operating system command line type the following:

VFYIMGCLG IMGCLG(imagecatalogxx) TYPE(*OTHER) SORT(*YES)

Press the Enter key.

Note: If this is part of an upgrade to V5R3M0 or to a higher release, verifying the image catalog can not be done until the software agreements have been accepted and space has been reserved for licensed internal code.


*** End of Alternate Steps ***


For more information on virtual tape, you can download the IBM Redbooks at the following address:

http://www.redbooks.ibm.com/redbooks/pdfs/sg247164.pdf

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Historical Number

30852541

Document Information

Modified date:
18 December 2019

UID

nas8N1016479