This chapter describes the export, import, backup, and recovery capabilities and tools available for Portal Framework applications.
This chapter includes the following topics:
Section 44.1, "Exporting and Importing Portal Framework Applications for Data Migration"
Section 44.2, "Backing Up and Recovering Portal Framework Applications"
Portal Framework applications store data related to configuration and content for the various features in several locations. To facilitate disaster recovery and the full production lifecycle from development through staging and production, Oracle WebCenter Portal provides a set of utilities that enable you to back up this data, and move the data between Portal Framework applications in staging and production environments.
If you want to migrate a test instance to a production instance, see the "Moving Oracle WebCenter Portal to a Target Environment" section in Administrator's Guide which describes an alternative migration approach.
Permissions:
To perform the tasks in this chapter, you must be granted the WebLogic ServerAdmin
role through the Oracle WebLogic Server Administration Console.
See also, Section 1.8, "Understanding Administrative Operations, Roles, and Tools."
This section describes how to export and import metadata and application customizations for Portal Framework applications developed using Oracle JDeveloper.
It includes the following sections:
Section 44.1.1, "Understanding Portal Framework Application Export and Import"
Section 44.1.2, "Prerequisites for Portal Framework Application Export and Import"
Section 44.1.3, "Exporting Portlet Client Metadata for Portal Framework Applications"
Section 44.1.4, "Importing Portlet Client Metadata for Portal Framework Applications"
Section 44.1.5, "Exporting Portal Resources for Portal Framework Applications"
Section 44.1.6, "Importing Portal Resources for Portal Framework Applications"
Section 44.1.7, "Exporting Metadata for Portal Framework Applications"
Section 44.1.8, "Importing Metadata for Portal Framework Applications"
Section 44.1.9, "Migrating Security for Portal Framework Applications"
Section 44.1.10, "Migrating Schema Data for Portal Framework Applications"
Several migration tools are available to export and import Portal Framework application, their connections and customizations (that is, customizations applied to an application, pages, and portlets) between stage and production environments (Figure 44-1).
Figure 44-1 Portal Framework Application Export and Import
Table 44-1 lists available migration tools and their capabilities. All customizations listed in Table 44-1 are migrated with Portal Framework applications.
Table 44-1 Portal Framework Application Migration Tools
Migration Tools | Capabilities |
---|---|
Portlet Client WLST Commands |
Enable export and import of portlet client metadata, and portlet customizations and personalizations. |
Portal Resource WLST Commands |
Enable export and import of portal resources, such as skins, page templates, and so on. |
MDS WLST Commands |
Enables export and import of:
|
Security Migration WLST Commands |
Enables export and import of security policies, including roles and mapping of users and roles. |
Oracle Database Utilities |
Enables export and import of Portal Framework application data. For information, see the "Oracle Data Pump" part in Oracle Database Utilities guide. |
Non-Oracle database utilities |
Refer to the database manufacturer's documentation for information about their data migration tools. |
Before exporting or importing metadata and customizations for a Portal Framework application, ensure the following:
The database in which the application metadata and schema is stored is up and running.
The target instance is configured with the same set of tools and services as the source instance. Additional tools and services can be configured in the target, if required, but minimally, the configuration in the source and target must match.
Both the source and target instances have the same WebCenter Content configuration. Moving the content between mixed configurations is not supported. For example, both instances must have either Folders_g or FrameworkFolders configured as the folder service. If Folders_g is enabled on the source instance and FrameworkFolders on the target instance, any export or import of portals with content between the two instances will fail.
The jps.policystore.removal
parameter is set to OFF
in your application's weblogic-application.xml
so that policies are migrated on import:
<application-param> <param-name>jps.policystore.removal</param-name> <param-value>OFF</param-value> </application-param>
If this option is not set, no policy information is imported. In some instances you may not want to migrate policy data, for example, when migrating from a test environment to a production environment where test data is not required. Note however, that pages created on the source instance at runtime do not display on the target instance because no page grants exist on the target.
To export portlet client metadata and producer customizations and personalizations for a Portal Framework application, use the WLST command exportPortletClientMetadata
. This command is run on the entire application, and therefore, it exports metadata of all the producers stored in an application. You cannot opt to export metadata for specific producers.
Before you run the command, ensure that the custom managed server on which the Portal Framework application is deployed, the portlet producers, and the database in which the application metadata or schema is stored are up and running.
For detailed syntax and examples, see the "exportPortletClientMetadata" section in WebLogic Scripting Tool Command Reference.
For information on how to run WLST commands, see Section 1.13.3.1, "Running Oracle WebLogic Scripting Tool (WLST) Commands."
For information on how to export portlet client metadata associated with all applications, see the "How to Manage the Persistence Store for JSR 286 Portlets" and "Migrating a PDK-Java Producer Persistence Store" sections in Developing Portals with Oracle WebCenter Portal and Oracle JDeveloper.
To import portlet client metadata and producer customizations and personalizations for a Portal Framework application, use the WLST command importPortletClientMetadata
.
Prerequisites:
The database in which the application metadata or schema is stored and the portlet producers must be up and running.
Use the WLST command exportPortletClientMetadata
to export the portlet client metadata and producer customizations and personalizations to an EAR file, See also, Section 44.1.3, "Exporting Portlet Client Metadata for Portal Framework Applications".
For detailed syntax and examples, see the "importPortletClientMetadata" section in WebLogic Scripting Tool Command Reference. See also, "Metadata Services (MDS) Custom WLST Commands".
For information on how to run WLST commands, see Section 1.13.3.1, "Running Oracle WebLogic Scripting Tool (WLST) Commands."
Authorized users can download portal resources, such as skins and page templates, while a Portal Framework application is running, edit and extend them in tools such as Oracle JDeveloper, and then upload them back to the Portal Framework application. Users who want to share or migrate portal resources to other Portal Framework applications can use the download feature too.
You can download the following portal resources at runtime through the Portal Framework's Administration Console:
Skins
Page styles
Page templates
Content Presenter display templates
Navigations
Resource catalogs
Task flows
Task flow styles
When you download (or export) a portal resource, the resource details are saved to an export archive (.EAR). You can save the export archive to your local file system or a remote server file system using a filename of your choice.
For details, see Section 43.5.8, "Uploading and Downloading an Asset".
Alternatively, system administrators can perform the same task using the WLST command exportWebCenterResource
. For command syntax and examples, see the "exportWebCenterResource" section in WebLogic Scripting Tool Command Reference.
Authorized users can import portal resources, such as skins and page templates, while a Portal Framework application is running. You can import the following portal resources at runtime through the WebCenter Portal Administration Console:
Skins
Page styles
Page templates
Content Presenter templates
Navigations
Resource catalogs
Task flows
Task flow styles
You can import portal resources previously saved to WebCenter Portal export archive files (.ear), on your local or remote server file system. Existing portal resources, that is, resources with the same internal ID are overwritten on import.
For details, see Section 43.5.8, "Uploading and Downloading an Asset".
Alternatively, administrators can perform the same task using the WLST command importWebCenterResource
. For command syntax and examples, see the "importWebCenterResource" section in WebLogic Scripting Tool Command Reference.
For information on how to run WLST commands, see Section 1.13.3.1, "Running Oracle WebLogic Scripting Tool (WLST) Commands."
Portal Framework application metadata associated with pages, task flows, tools, and services is stored in the Oracle metadata store (MDS). For detailed information about MDS, see the "Managing the MDS Repository" chapter in Administrator's Guide.
For a particular Portal Framework application, you can use the exportMetadata
command to export all base documents and their customizations stored in MDS or metadata for a specific tool or service.
For example:
exportMetadata(application='myWebCenterApp', server='WC_CustomPortal', toLocation='/tmp/myrepos', docs='/oracle/webcenter/**')
Where:
application
: Name of the Portal Framework application for which the metadata is to be exported (for example, myWebCenterApp)
.
server
: Server on which the Portal Framework application is deployed (for example, WC_CustomPortal)
.
toLocation
: Target directory to which documents selected from the source partition are to be exported. The toLocation
parameter can be used as a temporary file system for migrating metadata from one server to another.
docs
: List of comma separated fully qualified document name(s) and/or document name patterns (* and ** patterns).
In this example, "docs='/oracle/webcenter/**
" exports the required documents for all Oracle WebCenter Portal's tools and services that store metadata in MDS.
Note:
The "docs='/oracle/webcenter/**
" command does not export portlet customizations and personalizations or changes to configuration files such as connections.xml
and adf-config.xml
.
To export portlet metadata, run the WLST command exportPortletClientMetadata
. See also, Section 44.1.3, "Exporting Portlet Client Metadata for Portal Framework Applications".
To export configuration file updates that are stored in MDS, run the WLST command exportMetadata
with "docs='/META-INF/mdssys/cust/adfshare/adfshare/**
". See also, Appendix A, "adf-config.xml and connections.xml".
For detailed syntax and examples, see the "exportMetadata" section in WebLogic Scripting Tool Command Reference.
For information on how to run WLST commands, see Section 1.13.3.1, "Running Oracle WebLogic Scripting Tool (WLST) Commands."
Metadata, which consists of base and customization documents, are stored in the following paths:
Analytics:/oracle/webcenter/analytics/**
Announcements: /oracle/webcenter/collab/announcement/**
Blogs: /oracle/webcenter/blog/**
Documents: /oracle/webcenter/doclib/**
and /oracle/webcenter/doclib/view/jsf/fragments/**
Discussions: /oracle/webcenter/collab/forum/**
General Settings: /oracle/webcenter/generalsettings/**
Events:/oracle/webcenter/collab/events/**
External Applications:/oracle/webcenter/admin/**
and oracle/adfinternal/extapp/**
Instant Messaging and Presence: /oracle/webcenter/collab/rtc/**
Links: /oracle/webcenter/relationship/**
Language: /oracle/webcenter/webcenterapp/**
Lists: /oracle/webcenter/list/** and /oracle/webcenter/list/view/jsf/regions/**
Mail: /oracle/webcenter/collab/mail/**
Navigations: /oracle/webcenter/navigationtaskflows/**
Notes: /oracle/webcenter/note/**
Page: /oracle/webcenter/page/** and /pageDefs/**
Polls: /oracle/webcenter/collab/survey/**
People Connections (Connections):/oracle/webcenter/peopleconnections/connection/**
People Connections (Feedback):/oracle/webcenter/peopleconnections/kudos/**
People Connections (Profile Gallery):/oracle/webcenter/peopleconnections/personalweb/**
People Connections (Profile):/oracle/webcenter/peopleconnections/profile/**
People Connections (Message Board):/oracle/webcenter/peopleconnections/wall/**
Polls: /oracle/webcenter/collab/survey/**
Recent Activity: /oracle/webcenter/recentactivity/**
Resource Action Handler: /oracle/webcenter/framework/service/**
RSS News Feed: oracle/webcenter/rssviewer/**
Scope: /oracle/webcenter/framework/scope/**
Search: /oracle/webcenter/search/**
Security: /oracle/webcenter/security/**
Smart Tag: /oracle/webcenter/collab/smarttag/**
Portal Browser: /oracle/webcenter/community/**
Portal Contacts: /oracle/webcenter/people/**
Subscriptions: /oracle/webcenter/notification/**
Tags: /oracle/webcenter/tagging/**
adf-config.xml, connections.xml: /META-INF/mdssys/cust/adfshare/adfshare/**
Configuration file updates are not stored under the /oracle/webcenter/
directory alongside Oracle WebCenter Portal's tools and services metadata. To export customizations associated with these files, run exportMetadata
again with "docs='META-INF/mdssys/cust/adfshare/adfshare/**"
. See also, Appendix A, "adf-config.xml and connections.xml".
To import tools and services metadata and customizations for a Portal Framework application, use the WLST command importMetadata
. For example:
importMetadata(application='myWebCenterApp', server='WC_CustomPortal', fromLocation='/tmp/myrepos', docs='/**')
Where:
application
: Name of the Portal Framework application for which the metadata is to be imported (for example, myWebCenterApp
).
server
: Name of the target server on which the application is deployed (for example, WC_CustomPortal
).
fromLocation
: Source directory from which documents are imported. The fromLocation
parameter can be any temporary file system location for migrating metadata from one server to another.
docs
: List of comma separated fully qualified document name(s) and/or document name patterns (* and ** patterns).
For detailed syntax and examples, see the "importMetadata" section in WebLogic Scripting Tool Command Reference.
See also, Section 1.13.3.1, "Running Oracle WebLogic Scripting Tool (WLST) Commands."
Security migration involves moving the identity store, credential store, and policy store, from one Portal Framework application to another. The migration process for Portal Framework applications is exactly the same as that described for the out-of-the-box application "WebCenter Portal". For details, see:
Use export and import database utilities to migrate or back up application schema data for a Portal Framework application. This section includes the following subsections:
Section 44.1.10.1, "Understanding Schemas Used by Portal Framework Applications"
Section 44.1.10.2, "Exporting Schema Data for Portal Framework Applications"
Section 44.1.10.3, "Importing Schema Data for Portal Framework Applications"
Oracle WebCenter Portal components require that various schemas are installed in a supported database. Your Portal Framework applications may use one or more of the following schemas:
WEBCENTER
- For using tags, links, lists, polls, and people connections in your application
PORTLET
- For storing portlet producer data and customizations
ACTIVITIES
- For storing activity graph and analytics data
DISCUSSIONS
and DISCUSSIONS_CRAWLER
- For storing discussions and announcements
OCS
- For storing documents in Oracle WebCenter Content Server
To export data associated with a Portal Framework application, use the appropriate database utility:
For an Oracle database, go to ORACLE_HOME
/bin
of your database and run the expdp
command.
For example, see Example 44-1 which shows how to export the WEBCENTER
schema. The example shows that before exporting the schema data, you must create a directory where the exported data will be stored. You can use similar command for other schemas listed in Section 44.1.10.1, "Understanding Schemas Used by Portal Framework Applications."
For non-Oracle databases, refer to the manufacturer's documentation.
Example 44-1 Oracle Data Pump Utility (Exporting WEBCENTER Schema)
sqlplus "sys/password@serviceid as sysdba" create or replace directory dmpdir as 'full_path_to_directory_on_file_system'; GRANT read,write ON directory dmpdir TO public; exit; DB_ORACLE_HOME/bin/expdp \"sys/password@serviceid as sysdba\" directory=dmpdir dumpfile=wcp.dmp SCHEMAS=srcprefix_WEBCENTER EXCLUDE=STATISTICS NOLOGFILE=Y
Where:
DB_ORACLE_HOME
is the directory in which the database for the WebCenter Portal schema (WEBCENTER
) is installed.
password
is the password for system database user. For example, mydb1234
.
serviceid
is the service ID of the database connection.
directory
is the location on the database machine where the dump file will be created.
dumpfile
identifies the name of the file that will contain the exported data.
SCHEMAS
identifies the schema to be exported. Include the RCU suffix that was used during installation ( _WEBCENTER
), along with a user supplied prefix. For example, DEV_WEBCENTER
.
EXCLUDE=STATISTICS
specifies not to export statistics for the tables.
NOLOGFILE=Y
Suppresses the creation of a log file.
For detailed expdp
command information, see the Oracle Database Utilities guide.
To import Portal Framework application data, use the appropriate database utility:
For an Oracle database, go to ORACLE_HOME
/bin
of your database and run the impdp
command.
For example, see Example 44-2 which shows how to import the WEBCENTER
schema. You can use similar command for other schemas listed in Section 44.1.10.1, "Understanding Schemas Used by Portal Framework Applications."
For non-Oracle databases, refer to the manufacturer's documentation.
Example 44-2 Oracle Data Pump Utility (Importing WEBCENTER Schema)
DB_ORACLE_HOME/bin/sqlplus "sys/password@serviceid as sysdba" create or replace directory dmpdir as 'mydmpdirectory'; GRANT read,write ON directory dmpdir TO public; drop user tgtprefix_WEBCENTER cascade; exit; DB_ORACLE_HOME/bin/impdp \"sys/password@serviceid as sysdba\" directory=dmpdir dumpfile=wcp.dmp SCHEMAS=tgtprefix_WEBCENTER
Where:
DB_ORACLE_HOME
is the directory in which the database for the WebCenter Portal schema (WEBCENTER
) is installed.
password
is the password for system database user.
serviceid
is the service ID of the database connection.
directory
is the location on the database machine where the dump file is located.
dumpfile
is the name of the file that contains data to be imported.
SCHEMAS
identifies the target schema to be imported. Schema names include the RCU suffix that was used during installation (_WEBCENTER
), along with a user supplied prefix. For example, DEV_WEBCENTER
.
Use the SCHEMAS
parameter when schema names on the source and target match. For example, both schemas are named DEV_WEBCENTER
.
If schema names do not match, use the REMAP_SCHEMA
parameter instead. For details, see Example 41-3, "Importing WebCenter Portal Schema Data (Source and Target Schema Names Different)".
For detailed impdp
command information, see the Oracle Database Utilities guide.
To recover data from disasters, such as the loss of database hardware, inadvertent removal of data from file or database, it is important to back up Portal Framework applications on a frequent basis. The frequency of backup depends on how often the underlying information stored for the application changes in a particular customer application, and how much time and amount of information could acceptably be lost. Incremental or partial backups may be applied where the data is critical to the business and must be restored due to a failure.
Backup and recovery of Portal Framework applications and WebCenter Portal components can be managed through database export and import utilities, and various other tools. For more information, see the "Advanced Administration: Backup and Recovery" part in Administrator's Guide.