restoreConfig 命令

在使用 backupConfig 命令备份配置之后,使用 restoreConfig 命令来复原节点的配置。

支持的配置 支持的配置:

本文是关于概要文件配置迁移。要将应用程序迁移到最新版本,请使用 WebSphere® Application Server Migration Toolkit。有关更多信息,请参阅 WASdev 上的 Migration Toolkit

sptcfg

restoreConfig 命令是使用 backupConfig 命令备份配置后复原节点配置的简单实用程序。缺省情况下,节点上的所有服务器在配置恢复之前停止,这样在恢复期间就不会发生节点同步。如果配置目录已存在,将在恢复发生之前重命名此目录。要了解有关从何处运行此命令的更多信息,请参阅“使用命令行工具”。

如果直接对 app_server_root/installedApps 目录中的应用程序文件进行更改(也就是所谓的“热部署”过程),但是不对 app_server_root/config 目录中的应用程序文件进行相同的更改,那么当使用 restoreConfig 命令时可能会覆盖这些更改。

backupConfig 命令不保存文件许可权或所有权信息。restoreConfig 命令使用当前 umask 和有效用户标识 (EUID) 以在恢复文件时设置许可权和所有权。如果要求已复原的文件有原始许可权和所有权,请使用 tar 命令(在所有 UNIX 或 Linux 系统上都可用)来备份和复原配置。

restoreConfig 命令在 QEJBSVR 用户概要文件下运行,以确保 QEJBSVR 用户概要文件是已创建的目录和文件的所有者。系统将对于已创建的目录的 *PUBLIC 权限设置为 *EXCLUDE。先前对配置目录中目录和文件存在的所有专用权限都会失去。使用“授予 WebSphere Application Server 权限 (grtwasaut) ”Qshell 脚本或者 CHGAUT CL 命令来设置已失去的任何专用权限。
注: QEJBSVR 用户概要文件必须至少对路径中包含 backup_file 的每个目录都具有 *X 权限,并且对 backup_file 具有 *R 权限。
restoreConfig 命令将目录结构及其内容的所有者设置为 QEJBSVR 用户概要文件,但它不恢复专用权限。如果正在将 IBM® HTTP Server 或 Lotus® Domino® HTTP Server 实例与位于同一系统或分区上的应用程序服务器配合使用,并且应用程序服务器的 plugin-cfg.xml 文件位于 profile_root/config 目录结构下,请按照下列指示信息对 IBM HTTP Server 或 Lotus Domino HTTP Server 的用户概要文件授予必需的专用权限。
注: 如果未使用与已复原的概要文件位于同一系统上的 IBM HTTP Server 或 Lotus Domino HTTP Server,请不要完成这些步骤。另外,如果 plugin-cfg.xml 文件不在概要文件的 config 目录结构下,也无需执行这些步骤。
  1. 登录系统。
  2. 使用 STRQSH 命令启动 Qshell 会话。
  3. 浏览至应用程序服务器的 app_server_root/bin 目录。
  4. 使用以下 grtwasaut Qshell 命令对包含 plugin-cfg.xml 文件的路径中的每个目录(从 config 目录开始)授予执行权限 (x):
    grtwasaut -profileName profile_name -object path -dtaaut x -user user
    其中 profile_name 是已复原的概要文件配置的名称,path 是要修改的相对于概要文件根目录的目录路径,user 是 QTMHHTTP(对于 IBM HTTP Server)或 QNOTES(对于 Lotus Domino HTTP Server)。
    例如,如果对 iSeries 平台使用 IBM HTTP Server,并且 myprofile 概要文件的 plugin-cfg.xml 文件位于 profile_root/config/cells/MYSYSTEM_myprofile/nodes/MYSYSTEM_myprofile/servers/myHTTPinstance 目录中,请运行下列命令:
    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
    如果对 iSeries 平台使用 IBM HTTP Server,并且 myprofile 概要文件的 plugin-cfg.xml 文件位于 profile_root/config/cells 目录中,请使用以下示例:
    grtwasaut -profileName myprofile -object config/cells -dtaaut x -user QTMHHTTP
    grtwasaut -profileName myprofile -object config -dtaaut x -user QTMHHTTP
  5. 使用以下 grtwasaut 命令对 plugin-cfg.xml 文件授予“读取和执行”(rx) 权限:
    grtwasaut -profileName profile_name -object path/plugin-cfg.xml -dtaaut x -user user
    其中 profile_name 是已复原的概要文件配置的名称,path 是要修改的相对于概要文件根目录的目录路径,user 是 QTMHHTTP(对于 IBM HTTP Server)或 QNOTES(对于 Lotus Domino HTTP Server)。
    例如,如果对 iSeries 平台使用 IBM HTTP Server,并且 myprofile 概要文件的 plugin-cfg.xml 文件位于 profile_root/config/cells/MYSYSTEM_myprofile/nodes/MYSYSTEM_myprofile/servers/myHTTPinstance 目录中,请输入以下命令:
    grtwasaut -profileName myprofile -object config/cells/MYSYSTEM_myprofile/nodes/MYSYSTEM_myprofile
    /servers/myHTTPinstance/plugin-cfg.xml -dtaaut rx -user QTMHHTTP
    如果对 iSeries 平台使用 IBM HTTP Server,并且 myprofile 概要文件的 plugin-cfg.xml 文件位于 profile_root/config/cells 目录中,请使用以下示例:
    grtwasaut -profileName myprofile -object config/cells/plugin-cfg.xml -dtaaut rx -user QTMHHTTP

位置

profile_root/bin 目录发出该命令。

语法

命令语法如下所示:

restoreConfig backup_file [options]
其中 backup_file 指定要复原的文件。如果您一个文件也没有指定,命令不会运行。

参数

下列选项可用于 restoreConfig 命令:

-help
显示用法说明
-location directory_name
指定复原备份文件的目录
该位置缺省为 profile_root/config 目录。
-logfile file_name
指定写入跟踪信息的日志文件的位置

缺省情况下,日志文件名为 restoreConfig.log,并且在 logs 目录中创建。

-nostop
指示 restoreConfig 命令在复原配置之前不要停止服务器
-password password
如果在服务器中启用安全性,那么指定认证的密码
-profileName profile_name
在多概要文件安装中定义应用程序服务器进程的概要文件

在单概要文件环境中运行不需要 -profileName 选项。此选项的缺省值为缺省概要文件。

-quiet
禁止显示 restoreConfig 命令以正常方式显示的进度信息
-replacelog
替换日志文件,而不是附加到当前日志
-trace
将跟踪信息生成日志文件以进行调试
-username user_name
如果在服务器中启用安全性,那么指定认证的用户名;等同于 -user 选项
-user user_name
如果在服务器中启用安全性,那么指定认证的用户名;等同于 -username 选项
-?
显示用法说明

用法

下列示例说明了正确的语法:

restoreConfig WebSphereConfig_2006-04-22.zip

以下示例将给定的文件复原到 /tmp 目录,并且在开始复原之前不停止任何服务器:

restoreConfig WebSphereConfig_2006-04-22.zip -location /tmp -nostop
以下示例将存储在 /home/mydir/myprofileBackup.zip 中的配置恢复到概要文件 myprofile 的配置:
restoreConfig /home/mydir/myprofileBackup.zip -profileName myprofile

注意,如果您将配置复原到与您在执行 backupConfig 命令时备份的目录不同的目录,那么您可能需要手动更新配置目录中的某些路径。


指示主题类型的图标 参考主题



时间戳记图标 最近一次更新时间: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-iseries&topic=rxml_restoreconfig
文件名:rxml_restoreconfig.html