WebSphere Portal Transfer with XMLAccess, Release Builder and Site Management

XMLAccess

 

Export from wps01:

Copy ExportRelease.xml from <PortalServer>/doc/xml-samples/  to <PortalServer>/bin

Run

xmlaccess.bat -in ExportRelease.xml -user wpsadmin -password wpsadmin -url http://wps01.ibm.com:10040 /wps/config -out wps01_export.xml


Empty Portal Task

Before running import, target server need to empty.

Check <wp_profile_root>/ ConfigEngine/properties/wkplc.properties, make sure wasadmin and wpsadmin password has been configured.

Run < wp_profile_root >/ConfigEngine/ConfigEngine.bat empty-portal


 

Before import to wps02:

 

Copy the entire < wp_profile >/PortalServer /deployed/archive directory from the source to the target machine, because in general, all deployed WAR files are copied to this directory.


Import to wps02:

Copy wps01 export file to wps02 < PortalServer >/bin

Run

xmlaccess.bat -in wps01_export.xml -user wpsadmin -password wpsadmin - url http://wps02.ibm.com:10040 /wps/config

 

ReleaseBuilder

 

Create delta xml

Stop websphere portal server before you run release builder.

Go to wps01 < PortalServer >/bin Run

releasebuilder.bat -inOld wps01_release01.xml -inNew wps01_release02.xml -out differences_wps01.xml

 

Import delta changes

Copy differences_wps01.xml to wps02 < PortalServer >/bin

Run

xmlaccess.bat -in differences_wps01.xml -user wpsadmin -password wpsadmin - url http://wps02.ibm.com:10040 /wps/config

 

Prompt user id and password

 

If you try to include xmlaccess into your script and don't want user id and password in your script, use -askforCredential parameter in xmlaccess, like: xmlaccess.bat -in wps01_export.xml - url http://wps02.ibm.com:10040 /wps/config -askForCredential

 

An example of export portlet, label, page and theme/skin

<?xml version="1.0" encoding="UTF-8"?>
<!--
 =================================================================
 * Licensed Materials - Property of IBM
 * (c) Copyright IBM Corp. 2003, 2006.  All rights reserved.
 *
 * US Government Users Restricted Rights - Use, duplication or
 * disclosure restricted by GSA ADP Schedule Contract with IBM
 * Corp.
 *
 * DISCLAIMER OF WARRANTIES.  The following [enclosed] code is
 * sample code created by IBM Corporation.  This sample code is
 * not part of any standard or IBM product and is provided to you
 * solely for the purpose of assisting you in the development of
 * your applications.  The code is provided "AS IS", without
 * warranty of any kind.  IBM shall not be liable for any damages
 * arising out of your use of the sample code, even if they have
 * been advised of the possibility of such damages.
 *
 =================================================================
-->

<request
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd"
    type="export">

    <!-- sample for exporting a page with portlet -->
    <portal action="locate">
        <web-app action="locate" domain="rel" objectid="1_CGAH47L00OSAD0I4C9Q0QF3000" uid="vgn-ext-templating.war.webmod">
            <portlet-app action="locate" domain="rel" name="Application Name not available for this Application" objectid="2_CGAH47L00OSAD0I4C9Q0QF3004" uid="vgn-ext-templating.war">
                <portlet action="export" domain="rel" name="ContentRegionPortlet.$cloned.3_0773GMK41GJ870I2KEJSP910B2" objectid="3_0773GMK41GJ870I2KEJSP910B2"/>
                <portlet action="export" domain="rel" name="ContentRegionPortlet.$cloned.3_0773GMK41GJ870I2KEJSP910B1" objectid="3_0773GMK41GJ870I2KEJSP910B1"/>
                <portlet action="export" domain="rel" name="ItemRegionPortlet.$cloned.3_0773GMK41GJ870I2KEJSP910R0" objectid="3_0773GMK41GJ870I2KEJSP910R0"/>
                <portlet action="export" domain="rel" name="ContentRegionPortlet.$cloned.3_0773GMK41GJ870I2KEJSP910B3" objectid="3_0773GMK41GJ870I2KEJSP910B3"/>
                <portlet action="export" domain="rel" name="ContextEditPortlet" objectid="3_CGAH47L00OSAD0I4C9Q0QF3007"/>
                <portlet action="export" domain="rel" name="ItemRegionPortlet.$cloned.3_0773GMK41GJ870I2KEJSP910V0" objectid="3_0773GMK41GJ870I2KEJSP910V0"/>
            </portlet-app>
        </web-app>
        <content-node action="export" uniquename="cot.dpm.openData" export-descendants="true"/>
        <skin action="export" domain="rel" objectid="K_CGAH47L008BID0IK0Q079H0046" uniquename="wps.skin.Sample"/>
        <theme action="export" defaultskinref="K_CGAH47L008BID0IK0Q079H0046" domain="rel" objectid="J_CGAH47L008BID0IK0Q079H0041" uniquename="ibm.portal.theme.Sample">
    </portal>
</request>

ConfigEngine clean and protect password

When your working with ConfigEngine, you will need Portal and WAS Admin password. SO instead of passing that information on command line you can set, password of WAS Admin as value of WasPassword property and password of portal admin as value of PortalAdminPwd password. Once your done executing your script dont forget to remove the password from the config files using two steps process.

  1. First clean up the work directories created during the config process by executing ConfigEngine.bat cleanup-work-dir command
  2. Remove password from wkplc.properties and wkplc_comp.properties file using ConfigEngine.sh delete-passwords command.

Migrate from earlier version to later version

WPmigrate.bat portal-pre-upgrade
-DbackupDirectory=C:/mybackup
-DcurrentPortalDirectory=C:/ibm/PortalServer
-DcurrentPortalAdminId=wsadmin -DcurrentPortalAdminPwd=wsadmin
-DDbPassword=db2admin -DgroupExport="true" -DVirtualPortal=test

 

WPmigrate.bat portal-post-upgrade
-DbackupDirectory= C:/mybackup -DPortalAdminId=wpadmin
-DPortalAdminPwd=wsadmin -DWasUserid=wsadmin
-DWasPassword=wasadmin
-Dmigration.vmm.database.admin.password=db2admin
-Dmigration.wmm.database.admin.password=db2admin
-DoldProfile=wp_profile -DprofileName=wp_profile
-DVirtualPortal=test

 

Customized properties

Once you have your own .properties file you can ask ConfigEngine to use that .properties file using these two command line parameters


  1. parentProperties: Value of this command line parameter should be a path to the .properties file that should be used as parent of wkplc.properties file. If same property is present in both parentProperties file and wkplc.properties then the value in parentProperties take precedence
  2. SaveParentProperties: If you set SaveParentProperties to true then ConfigEngine will take the values from the parentProperties and set them in wkplc.properties file if the configuration task is completed successfully.
ConfigEngine.bat -DparentProperties=/helper_file_directory/helper.properties -DSaveParentProperties=true

發佈了23 篇原創文章 · 獲贊 0 · 訪問量 9萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章