44 Managing Export, Import, Backup, and Recovery for Portal Framework Applications

This chapter describes the export, import, backup, and recovery capabilities and tools available for Portal Framework applications.

This chapter includes the following topics:

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 Oracle Fusion Middleware Administrator's Guide which describes an alternative migration approach.

Permissions:

To perform the tasks in this chapter, you must be granted the WebLogic Server Admin role through the Oracle WebLogic Server Administration Console.

See also, Section 1.8, "Understanding Administrative Operations, Roles, and Tools."

44.1 Exporting and Importing Portal Framework Applications for Data Migration

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:

44.1.1 Understanding Portal Framework Application Export and Import

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

Description of Figure 44-1 follows
Description of "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:

  • Portal Framework application metadata including customizations made to pages, tools, and services

  • Data stored in the connections.xml and adf-config.xml documents

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.


44.1.2 Prerequisites for Portal Framework Application Export and Import

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.

  • 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.

44.1.3 Exporting Portlet Client Metadata for Portal Framework Applications

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 Oracle Fusion Middleware 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 Oracle Fusion Middleware Developing Portals with Oracle WebCenter Portal and Oracle JDeveloper.

44.1.4 Importing Portlet Client Metadata for Portal Framework Applications

To import portlet client metadata and producer customizations and personalizations for a Portal Framework application, use the WLST command importPortletClientMetadata.

Prerequisites:

For detailed syntax and examples, see the "importPortletClientMetadata" section in Oracle Fusion Middleware 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."

44.1.5 Exporting Portal Resources for Portal Framework Applications

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 Oracle Fusion Middleware WebLogic Scripting Tool Command Reference.

44.1.6 Importing Portal Resources for Portal Framework Applications

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 Oracle Fusion Middleware 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."

44.1.7 Exporting Metadata for Portal Framework Applications

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 Oracle Fusion Middleware 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.

For detailed syntax and examples, see the "exportMetadata" section in Oracle Fusion Middleware 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".

44.1.8 Importing Metadata for Portal Framework Applications

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 Oracle Fusion Middleware WebLogic Scripting Tool Command Reference.

See also, Section 1.13.3.1, "Running Oracle WebLogic Scripting Tool (WLST) Commands."

44.1.9 Migrating Security for Portal Framework Applications

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:

44.1.10 Migrating Schema Data for Portal Framework Applications

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:

44.1.10.1 Understanding Schemas Used by 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

44.1.10.2 Exporting Schema Data for Portal Framework Applications

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.

44.1.10.3 Importing Schema Data for Portal Framework Applications

To import Portal Framework application data, use the appropriate database utility:

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.

44.2 Backing Up and Recovering Portal Framework Applications

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 Oracle Fusion Middleware Administrator's Guide.