Restoring a profile

If created a backup of your profile and something happens to your system, you can restore the profile on IBM i5/OS.

To restore the profile, have a user profile with the following authorities:

Before restoring the saved version of the profile, this script renames Integrated File System (IFS) data associated with the existing profile, and duplicates the schema data. This protects against the case where the user specifies the wrong profile name and the wrong profile is restored.

To avoid unnecessarily using up storage on your system, delete the renamed and duplicated data after you have verified that the restore occurred successfully (check the log file for details on the renamed profile data). In addition, you can specify the -x parameter to prevent the schema data for the profile from being duplicated.

To restore a profile:

This script does not restore any remote database schemas associated with the profile.

  1. Stop all SQL jobs that are associated with the DB2 administrative account ID that was defined in the databases to be restored.

  2. Find the WebSphere Portal password that was valid for the profile at the time it was saved. Do not revert to a saved profile unless you know the correct password to use.

  3. Type STRQSH on the command line to start the QShell Interpreter.

  4. Change to the /QIBM/ProdData/PortalExpress/V61/Tools directory.

  5. Enter one of the following tasks to back up your profile:

    Option Description
    Base profile, including profiles federated into a cluster restoreProfile.sh parameters
    Network Deployment profile restoreProfile.sh parameters

    Use the following parameters listed in the table with the above tasks; the following parameters are required:

    -profileName (-p)

    Name of the profile to restore

    -mediaDevice (-m) and -date (-d) or -saveFileLib (-s)

    Specifies the media device where the profile is save, the date the profile was saved, or the library where the saved profile is stored

    The library name must be 10 characters are less.

    -forceDown (-f)

    Stops the servers associated with the profile; for example WebSphere_Portal and the HTTP server

    If you do not enter this parameter, manually stop the servers before running this task.

    Parameter names are case-sensitive.


    Table 1. Optional parameters for use with the script restoreProfile

    Parameter Description
    -help (-h)

    Displays help for the command

    -logDir (-l)

    Specifies where to save log files for this command.

    If a log directory is not specified using this parameter, logs are created by default in the savRstWp60 directory.

    If you specify a path using this parameter, the command will create only the last directory in the path. The other directories in the path must already exist.

    For example, if you specify -l /wcs01/logs, the /wcs01 directory must already exist.

    -noHttp (-n)

    Do not restore external HTTP data.

    -noSaftyNet (-x)

    Do not duplicate existing schema data.

    By default, the command duplicates existing schema data before deleting it. This protects against the case where the user enters the wrong profile name and the wrong profile is restored. Only use this parameter if you wish to prevent this duplication from happening.

    -propFilePath (-r)

    Specifies a path to the savRstWp.properties file to use for parameter input to this command. To use this parameter, first copy the file /QIBM/ProdData/PortalExpress/V61/Tools/sh_utils/savRstWp.properties to a new location in the Integrated File System (IFS) of the system on which you are restoring the profile, and then edit it to include the parameters you want to use. Note that save the file with the name savRstWp.properties.

    -seqNum (-q)

    Specifies the starting sequence number of the file set you want to restore. Normally you will not need this parameter, but if you saved multiple copies of the same instance on the same day on the same tape, you may need to distinguish which save set you want. This parameter is only valid with -m option and the media device must be a tape drive.

    -verify (-v)

    Verifies the command. If this parameter is used, the command outputs what would be done according to the parameters being used, without actually performing the restore.

  6. Check the log file to verify that the script completed successfully. After verifying that the restore is complete, delete any renamed profile data.


Examples

restoreProfile.sh -profileName wcs01 -mediaDevice tap01 -logDir /mylog -d 060105 -forceDown

This example restores profile wcs01 from media device tap01. Log files are saved to directory /mylog. The date of the backup being restored is June 1, 2005. Because the -f parameter is specified, all servers associated with the existing profile (which will be deleted as part of this process) are stopped.

restoreProfile.sh -v -p wcs01 -m tap01 -d 060105 -f

This example is the same as the previous example, except parameter short names are used and the -v parameter is specified to verify what the command will do before running it.

restoreProfile.sh -r /myprops

This example pulls parameter information from the savRstWp.properties file, which the user has previously saved in the /myprops directory.

The path does NOT include the file name. You can override parameters in the savRstWp.properties file by specifying them on the command line.


Parent topic:

Backing up and restoring profiles