Friday, November 14, 2008

Export/Import Portal

Export Existing Portal Page Groups:
First an export must be prepared in GUI of Portal, click on one of the login links to login with the portal user:
http://{HOSTNAME}:{PORT}/portal/page/portal

Click on the link navigator:

Click on the link export of every page group you want to export. In my case Export_portal_test

If this is the first page group you want to export you can make a new export set, if this is not the first page group you can add the page group to an existing page group.
Click on the next button:

Choose if you want to export extern objects, if you want this, select the objects and click the button Add to transportset.
When this is the only page group you want to export you can click the button Export Now. If you want to export more page groups you can save the export set for later use (button Save For Later).

Now you see a screen with a link to the log file of the process making the export ready. This export fills a couple of tables with information about your page groups. An script is generated that can be used to make a database export of these tables.

Copy the contents of this script to file on a linux server and make this file executable
chmod 700 exp_portal.sh

Now we can make an export of the portal tables which contain the page group export information. The Oracle SID is the database which hosts the portal metadata repository. First set the environment variables of the database:
. oraenv
ORACLE_SID = [oracle] ? [type the ORACLE SID]
./exp_portal.sh -mode export -s portal -p xxxxxxx -c $ORACLE_SID -d portal_dump.dmp

The portal password can be found in the OID. This script creates an database dump file: portal_dump.dmp. This file can be imported in another portal metadata repository database.

Import Portal Page Groups:
Copy the export script (created by portal) and the dump file which is created during execution of the export script to the database server which hosts the portal metadata repository where the page group should be imported to.

Execute the script to import the database dump in the other metadata repository like this:
. oraenv
ORACLE_SID = [oracle] ? [type the ORACLE SID]
./exp_portal.sh -mode import -s portal -p xxxxxx -pu portal -pp yyyyy -company none -c $ORACLE_SID -d portal_dump.dmp

The first password (xxxxxx) is for the portal user in the database, the second password (yyyyy)is from the portal user this password is given during installation of the Portal Application Server (same as orcladmin).

Now we can process the page group export in the portal. Log in on the portal builder click on one of the login links to login with the portal user:
http://{HOSTNAME}:{PORT}/portal/page/portal

Click on the tab Administer:

Now you can Browse Transport Sets in the portlet: Export/Import Transport Set there is a small button next to the import button:

Select the transport set you want to import and click on the button Import.

It is also possible to do it with a shell script: $ORACLE_HOME/portal/admin/plsql/wwu/opeasst.csh


For more information:
http://download-uk.oracle.com/docs/cd/B10464_05/portal.904/b13675/cg_imex.htm#i1022009

metalink note: 306785.1

No comments:

Post a Comment

comment