ShowTable of Contents
WCM provides a capability to manually export a web content library to disk from a source environment and then manually import it to a target environment. This capability allows you to take backup of web content libraries and is also used to move web content libraries between environments.
The web content library export and import process cannot be used to send item updates, deletes and moves between environments. It is only suitable for populating new items.
WCM v7 permits exporting and importing web content libraries between different versions of WCM provided the following criteria is met:
The WCM environment exporting the web content library is a lower version than the WCM environment importing the web content library. It is not possible to import libraries from WCM versions before 6.1.0.2.
Examples:
- It is possible to import a library exported from WCM version 6.1.0.2 into WCM version 7.0.x
- It is not possible to import a library exported from WCM version 7.0.x into version 6.1.0.2
Syndication versus the export and Import process
WCM syndication is designed to automatically replicate items between two WCM environments and keep them synchronized. Even though the web content library export and import process can be used to move web content libraries between two WCM environments, it does not replace the WCM syndication process for the following reasons:
- Syndication process can be used to send updates, deletes and moves whereas the export and import process is only suitable for populating new items.
- The export and import process only exports the current version of each item. If an item has multiple versions, they will not be exported.
- The export and import process will only export and import a child item when its parent item is successfully exported and imported.
- The export and import process will overwrite an item with the same path, name and ID on the target server.
- The export and import process does not change the Web content library and item level access controls on the target WCM environment. You need to run the member fixer tool on the imported library to fix references to missing users and groups on the target WCM environment.
- The export and import process cannot be used to import an item if an item on the target server has the same ID but a different parent than the item being imported.
Configuring the export and import process
Configuring the export and import process properties can be done from the IBM WebSphere Application Server administration console:
1. As an administrator, log into the the IBM WebSphere Application Server administration console and navigate to the following:
Resources -> Resource Environment -> Resource Environment Providers -> WCM WCMConfigService
2. From the WCM WCMConfigServices page that is loaded, click on
Custom properties as shown in the screenshot below.
Export process properties
Set or update the following properties on the server where you will run the export process:
- export.libraryname
Set this property to be the name of the web content library to transfer. If exporting multiple libraries enter each library name separated by a semi-colon.
Example: export.library=Lib01;Lib02;Lib03
- export.directory
Default value is set to ${USER_INSTALL_ROOT}/PortalServer/wcm/ilwwcm/system/export.
Set this property to the directory name on the source server where the exported data will be written. The export task creates a subdirectory with the name corresponding to library name within this directory for each exported library.
- export.singledirectory
The accepted values are either true or false.
If set to true, multiple libraries are written into a single directory specified by the export.directory property.
If set to false, the export task created subdirectories with the name corresponding to each exported library names.
Note: Changing any of these properties requires a server restart to reflect the new values.
Import process properties
Set or update the following properties on the server where you will run the import process:
- import.directory
Default value is set to ${USER_INSTALL_ROOT}/PortalServer/wcm/ilwwcm/system/import.
Set this property to the directory name on the target server from where the exported data is read when importing the data to the target server.
Note: If exporting and importing across a network, this property can be the same directory as the one specified in export.directory property. Otherwise, you must copy the exported data from the location specified in the export.directory property to the location specified in the import.directory property before running the import task.
If the export.singledirectory property was set to true when you exported your libraries, specify the parent directory where all the exported libraries are located.
If the export.singledirectory property was set to false when you exported your libraries, or if you only want to import specific libraries, then list the directory of each library separated by semicolons. Example: c:\import\Lib01;c:\import\Lib02;c:\import\Lib03.
If using the Linux platform use /; to separate each library, such as /opt/importdata/Lib01/;/opt/importdata/Lib02/;/opt/importdata/Lib03.
Note: Changing any of these properties requires a server restart to reflect the new values.
Running the export process
Complete the following steps to run the export process on the source server:
- Open a command prompt and navigate to the following directory:
/ConfigEngine
- Run the command:
On Windows: ConfigEngine.bat export-wcm-data -DWasPassword=password -DPortalAdminPwd=password
On Linux: ./ConfigEngine.sh export-wcm-data -DWasPassword=password -DPortalAdminPwd=password
Override the export.directory property defined in the WCM WCMConfigService service by using the -Dexport.directory parameter.
Example: ConfigEngine.bat export-wcm-data -Dexport.directory=c:\export
Override the export.singledirectory property defined in the WCM WCMConfigService service by using the -Dexport.singledirectory parameter.
Example: ConfigEngine.bat export-wcm-data -Dexport.singledirectory=false
Override the export.libraryname property defined in the WCM WCMConfigService service by using the -Dexport.libraryname parameter.
Example: ConfigEngine.bat export-wcm-data -Dexport.libraryname=libraryname
- Verify to ensure that the export process was completed successfully. Check to ensure the export directories were created correctly.
- Copy the exported data from the location specified in the export.directory property of the source server to the target server location specified in the import.directory property
Running the Import process
Complete the following steps to run the import process on the target server:
- Open a command prompt and navigate to the following directory:
/ConfigEngine
- Run the command:
On Windows: ConfigEngine.bat import-wcm-data -DWasPassword=password -DPortalAdminPwd=password
On Linux: ./ConfigEngine.sh import-wcm-data -DWasPassword=password -DPortalAdminPwd=password
Override the import.directory property defined in the WCM WCMConfigService service by using the -Dimport.directory parameter.
Example: ConfigEngine.bat import-wcm-data -Dimport.directory=c:\import\Lib01;c:\import\Lib02;c:\import\Lib03
- Verify that the import process has completed successfully by reviewing the list of libraries listed in the web content libraries section of the administration portlet on the target server.
- Reset the web content event log.
- Restart the server.
- Run the member fixer tool if necessary to fix references to missing users and groups on the target WCM environment.
Tips on importing large web content libraries
Follow these tips when importing large web content libraries:
- Disable JCR text search indexing on your WebSphere Portal server before exporting or importing large libraries. This will reduce the load on the database during the export and import process. To disable the JCR text search, edit the /PortalServer/jcr/lib/com/ibm/icm/icm.properties file and set the jcr.textsearch.enabled property to false. Restart the server for the change to take effect. After the export or import process has successfully completed, you must enable the JCR text search by changing the jcr.textsearch.enabled property to true. Please note that rebuilding the indexes can take some time.
- When uploading large libraries, ensure that there is sufficient disk space to accommodate the import. The location of the temporary directory is specified by the jcr.binaryValueFileDir property in the /PortalServer/jcr/lib/com/ibm/icm/icm.properties file.