+

Search Tips   |   Advanced Search

restoreConfig command

Use the restoreConfig command to restore the configuration of the node after backing up the configuration using the backupConfig command.

Supported configurations:

This article is about configuration migration, such as migrating deployment managers and federated nodes in a network deployment environment. The Application Migration Toolkit for WebSphere Application Server provides support for migrating applications from previous versions of WAS to the latest product version. For information about migrating applications, read more about the Application Migration Toolkit. sptcfg

The restoreConfig command is a simple utility to restore the configuration of the node after backing up the configuration using the backupConfig command. By default, all servers on the node stop before the configuration restores so that a node synchronization does not occur during the restoration. If the configuration directory already exists, it is renamed before the restoration occurs. For more information about where to run this command, see Using tools.

If we directly make changes to the application files in the app_server_root/installedApps directory, a process known as "hot deployment", but do not make the same changes to the application files in the app_server_root/config directory, the changes might be overwritten if you use the restoreConfig command.

The backupConfig command does not save file permissions or ownership information. The restoreConfig command uses the current umask and effective user ID (EUID) to set the permissions and ownership when restoring a file. If it is required that the restored files have the original permissions and ownership, use the tar command (available on all UNIX or Linux systems) to back up and restore the configuration.

(zos) For a logical directory for app_server_root/config, the restoreConfig command will not work.

(iseries) The restoreConfig command runs under QEJBSVR user profile to ensure that the QEJBSVR user profile is our owner of the directories and files created. The system sets the *PUBLIC authority to the directories that have been created to *EXCLUDE. Any private authorities that previously exist on the directories and files in the configuration directory are lost. Use the grant WebSphere Application Server authority (grtwasaut) Qshell script or the CHGAUT CL command to set any private authorities that were lost.

The QEJBSVR user profile must have at least *X authority to each directory in the path containing the backup_file and *R authority to the backup_file.

(iseries) The restoreConfig command sets our owner of the directory structure and its contents to the QEJBSVR user profile, but it does not restore private authorities. For an IBM HTTP Server or Lotus Domino HTTP Server instance with the application server on the same system or partition, and the plugin-cfg.xml file for the application server resides under the profile_root/config directory structure, use the following instructions to grant the necessary private authorities to the user profile for IBM HTTP Server or Lotus Domino HTTP Server.

If we are not using an IBM HTTP Server or Lotus Domino HTTP Server on the same system as the profile that was restored, do not complete these steps. Also, do not complete these steps if the plugin-cfg.xml file does not reside under the config directory structure for the profile.

  1. Sign on to the system.

  2. Start a Qshell session using the STRQSH command.

  3. Navigate to the app_server_root/bin directory for the application server.

  4. Use the following grtwasaut Qshell command to grant execute (x) authority to each directory in the path containing the plugin-cfg.xml file, starting with the config directory:

      grtwasaut -profileName profile_name -object path -dtaaut x -user user

    where profile_name is the name of the profile configuration that was restored, path is the directory path to modify relative to the profile root directory, and user is either QTMHHTTP (for the IBM HTTP Server) or QNOTES (for the Lotus Domino HTTP Server).

    For example, run the following commands if you use the IBM HTTP Server for the iSeries platform and the plugin-cfg.xml file for the myprofile profile resides in the profile_root/config/cells/MYSYSTEM_myprofile/nodes/MYSYSTEM_myprofile/servers/myHTTPinstance directory:

    grtwasaut -profileName myprofile -object config/cells/MYSYSTEM_myprofile/nodes/MYSYSTEM_myprofile/
    servers/myHTTPinstance -dtaaut x -user QTMHHTTP
    grtwasaut -profileName myprofile -object config/cells/MYSYSTEM_myprofile/nodes/MYSYSTEM_myprofile/
    servers -dtaaut x -user QTMHHTTP
    grtwasaut -profileName myprofile -object config/cells/MYSYSTEM_myprofile/nodes/MYSYSTEM_myprofile  -dtaaut x -user QTMHHTTP
    grtwasaut -profileName myprofile -object config/cells/MYSYSTEM_myprofile/nodes -dtaaut x -user QTMHHTTP
    grtwasaut -profileName myprofile -object config/cells/MYSYSTEM_myprofile -dtaaut x -user QTMHHTTP
    grtwasaut -profileName myprofile -object config/cells -dtaaut x -user QTMHHTTP
    grtwasaut -profileName myprofile -object config -dtaaut x -user QTMHHTTP

    Use the following example if you are using IBM HTTP Server for the iSeries platform and the plugin-cfg.xml file for the myprofile profile resides in the profile_root/config/cells directory:

      grtwasaut -profileName myprofile -object config/cells -dtaaut x -user QTMHHTTP grtwasaut -profileName myprofile -object config -dtaaut x -user QTMHHTTP

  5. Use the following grtwasaut command to grant read,execute (rx) authority to the plugin-cfg.xml file:

      grtwasaut -profileName profile_name -object path/plugin-cfg.xml -dtaaut x -user user

    where profile_name is the name of the profile configuration that was restored, path is the directory path to modify relative to the profile root directory, and user is QTMHHTTP (for the IBM HTTP Server) or QNOTES (for the Lotus Domino HTTP Server).

    For example, enter the following command if you use the IBM HTTP Server for the iSeries platform and the plugin-cfg.xml file for the myprofile profile resides in the profile_root/config/cells/MYSYSTEM_myprofile/nodes/MYSYSTEM_myprofile/servers/myHTTPinstance directory:

    grtwasaut -profileName myprofile -object config/cells/MYSYSTEM_myprofile/nodes/MYSYSTEM_myprofile
    /servers/myHTTPinstance/plugin-cfg.xml -dtaaut rx -user QTMHHTTP

    Use the following example if you are using IBM HTTP Server for the iSeries platform and the plugin-cfg.xml file for the myprofile profile resides in profile_root/config/cells directory:

      grtwasaut -profileName myprofile -object config/cells/plugin-cfg.xml -dtaaut rx -user QTMHHTTP


Location

Issue the command from the profile_root/bin directory.


Syntax

The command syntax is as follows:

(zos)

(iseries)

where backup_file specifies the file to be restored. If we do not specify one, the command will not run.


Parameters

The following options are available for the restoreConfig command:

-help

Prints a usage statement

-location directory_name

Directory where the backup file is restored

(dist)(zos) The location defaults to the app_server_root/config directory.

(iseries) The location defaults to the profile_root/config directory.

-logfile file_name

Location of the log file to which trace information is written

By default, the log file is named restoreConfig.log and is created in the logs directory.

-nostop

Tells the restoreConfig command not to stop the servers before restoring the configuration

-password password

Password for authentication if security is enabled in the server

(dist)(iseries) -profileName profile_name

Defines the profile of the Application Server process in a multiple-profile installation

The -profileName option is not required for running in a single profile environment. The default for this option is the default profile.

-quiet

Suppress the progress information that the restoreConfig command prints in normal mode

-replacelog

Replaces the log file instead of appending to the current log

-trace

Generates trace information into the log file for debugging purposes

-username user_name

User name for authentication if security is enabled in the server; acts the same as the -user option

-user user_name

User name for authentication if security is enabled in the server; acts the same as the -username option

-?

Prints a usage statement


Usage

The following example demonstrates correct syntax:

(zos)

(iseries)

The following example restores the given file to the /tmp directory and does not stop any servers before beginning the restoration:

(zos)

(iseries)

(iseries) The following example restores the configuration stored in /home/mydir/myprofileBackup.zip to the configuration for profile myprofile:

Be aware that if you restore the configuration to a directory that is different from the directory that was backed up when you performed the backupConfig command, we might need to manually update some of the paths in the configuration directory.


Related information:

  • backupConfig command