Use the restoreConfig command to restore
the configuration of your node after backing up the configuration
using the backupConfig command.
The restoreConfig command is a simple utility
to restore the configuration of your 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
the Using command line tools article.
If you 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.
The
restoreConfig command
runs under QEJBSVR user profile to ensure that the QEJBSVR user profile
is the 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.
Note: 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.
The
restoreConfig command
sets the owner of the directory structure and its contents to the
QEJBSVR user profile, but it does not restore private authorities.
If you are using 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 your
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.
Note: If you
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.
- Sign on to the system.
- Start a Qshell session using the STRQSH command.
- Navigate to the app_server_root/bin directory
for the application server.
- 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 your 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 your 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
- 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 your 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 your 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:
restoreConfig backup_file [options]
where
backup_file specifies
the file to be restored. If you 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
- Specifies the directory where the backup file is restored
- The location defaults to the profile_root/config directory.
- -logfile file_name
- Specifies the location of the log file to which trace information
is written
By default, the log file is named restoreConfig.log and
is created in your logs directory.
- -nostop
- Tells the restoreConfig command not to stop
the servers before restoring the configuration
- -password password
- Specifies the password for authentication if security is enabled
in the server
- -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
- Suppresses 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
- Specifies the user name for authentication if security is enabled
in the server; acts the same as the -user option
- -user user_name
- Specifies the 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:
restoreConfig WebSphereConfig_2006-04-22.zip
The
following example restores the given file to the /tmp directory
and does not stop any servers before beginning the restoration:
restoreConfig WebSphereConfig_2006-04-22.zip -location /tmp -nostop
The following example restores the configuration
stored in /home/mydir/myprofileBackup.zip to the configuration for
profile myprofile:
restoreConfig /home/mydir/myprofileBackup.zip -profileName 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, you might need to manually
update some of the paths in the configuration directory.
Also see the Using wsadmin scripting command line tools documentation.