Export and import a web content library


Overview

We can export the contents of a web content library to disk and import this data into another web content server. This function cannot be used to send updates, deletes and moves. It is only suitable for populating new items.

Before you begin, you can create an empty shared directory to hold the exported web content library. If moving data between servers, both systems must have write access to this directory. Alternately, you can scp the contents of the export directory to the import directory on the target host.


Import libraries into different versions

We can import libraries from a different version of Web Content Manager so long as the version you are importing the library into is later than the version you exported the library from. For example:

IBM recommends upgrading to the latest version of each release before attempting to import libraries between versions. It is not possible to export libraries from releases before 6.0.


Export and import a web content library versus syndication

This feature does not replace the syndication feature. Although this feature can be used to transfer data between servers, it is a manual process and is not meant to be used for regular updates between servers. Syndication is instead used to automatically keep two or more servers synchronized. Also, whereas syndication can be used to send updates, deletes and moves, the import feature is only suitable for populating new items.


Limitations

Saved versions of items are not exported. Only the current version of each item is exported.

Children are only exported and imported when the parent is successfully exported and imported.

If an item exists on the target server with the same path, name and ID, then the item is overwritten.

Library and item level access controls are left unchanged when a library is exported and imported. Run member fixer on the imported library to fix references to missing users and groups.

We cannot import an item if an item on the target server has the same ID but a different parent than the item being imported.


Disable JCR text search

IBM recommends disabling JCR text search indexing before exporting or importing. Edit...

.and set...

jcr.textsearch.enabled = false

Restart appservers for changes to take effect. After export/import is complete, re-enable JCR text search indexing.


Export and import large libraries

When importing web content libraries, a temporary directory is used to store the library files during the upload process. If the size of the uploaded files exceeds the available disk space for the temporary directory, the import operation fails. When uploading large libraries, ensure that there is sufficient disk space to accommodate the import.

The location of the temporary directory is specified by...

jcr.binaryValueFileDir

.in...

When exporting or importing large libraries, increase...

.to 360 seconds in the WAS administrative console...


Personalization components

Personalization rules created within a Personalization component are exported and imported along with web content library.

If you are using Personalization rules created directly in the Personalization portlet you need to export and import rules to and from Personalization on the same servers as web content by using the same process as moving WebSphere Portal content from a staging system to a production system. Personalization export and import must be performed before exporting and importing web content.


JSP components

If you are using JSP components manually copy any related JSP files to and from the same servers that you are exporting and importing to.


Export

  1. Log in to the dmgr console on the source server and click...

  2. Create or update the export properties.

    export.directory Directory on the source server where the exported data is written.

    The export task creates a subdirectory with the name corresponding to library name within this directory for each exported library. The default value is...

      PORTAL_HOME/PortalServer/wcm/ilwwcm/system/export
    export.libraryname The name of the web content library to transfer.

    If exporting multiple libraries enter each library name separated by a semi-colon. For example...

      export.library=Lib_1;Lib_2;Lib_3
    export.singledirectory If true, multiple libraries are written into a single directory specified by the property export.directory. If false, the export task created subdirectories with the name corresponding to each exported library names.

    For example, if export.directory is specified as C:/export and the library name is Web Library, the export task saves the exported library under...

      C:/export/Web Library

    Set this property to true when exporting multiple libraries that contain references between each library.

  3. Restart WebSphere_Portal server.

  4. Export the web content library from the source server:

        cd WP_PROFILE/ConfigEngine


      ./ConfigEngine.sh export-wcm-data -DWasPassword=foo -DPortalAdminPwd=foo

    For example:

    ./ConfigEngine.sh export-wcm-data -Dexport.libraryname="Design Common" -DWasPassword=foo -DPortalAdminPwd=bar

    We can override the export.directory property defined in the WCM WCMConfigService service by using the -Dexport.directory parameter. For example:

      export-wcm-data -Dexport.directory=c:/export

    We can override the export.singledirectory property defined in the WCM WCMConfigService service by using the -Dexport.singledirectory parameter. For example:

      export-wcm-data -Dexport.singledirectory=false

    .saves the exported libraries under different directories.

    We can override the export.libraryname property defined in the WCM WCMConfigService service by using the -Dexport.libraryname parameter. For example:

      export-wcm-data -Dexport.libraryname=libraryname

    To ensure that exported libraries can be successfully imported, do not change the names of any of the folders or files within the exported data.

  5. Verify that this transfer step completed without errors. If any errors occurred, check the portal logs on the target server for extended diagnostic information.

  6. Verify that the export directories were populated correctly, including any subdirectories for each exported library.


Import

  1. Log in to the IBM WAS administration console on the target server and click...

    If you are using this Web content server as part of a cluster, use the administration console for the dmgr when manipulating configuration properties.

  2. Create or update the import.directory property.

    This is the directory from where the exported data is read when importing the data to the target server. If exporting and importing across a network, this property can be the same directory as the one specified in export.directory property. Otherwise, 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 in step 2.

    • If you specified true for the export.singledirectory property when you exported libraries, specify the parent directory where all the exported libraries are located.

    • If you specified false for the export.singledirectory property when you exported libraries, or if you only want to import specific libraries, then list the directory of each library separated by semicolons. For example:

        c:/import/Lib1;c:/import/Lib2;c:/import/Lib3

      If using Linux use /; to separate each library, such as...

        /opt/importdata/Lib1/;/opt/importdata/Lib2/;/opt/importdata/Lib3

    You must restart server any time you change this setting.

  3. Import the web content library to the target server.

        cd WP_PROFILE/ConfigEngine


      ./ConfigEngine.sh import-wcm-data -DWasPassword=foo -DPortalAdminPwd=foo

    We can override the import.directory property defined in the WCM WCMConfigService service by using the -Dimport.directory parameter. For example:

      import-wcm-data -Dimport.directory=c:/import/Lib1;c:/import/Lib2;c:/import/Lib3

  4. Verify that the imported libraries have been imported by reviewing the list of libraries listed in the web content libraries section of the administration portlet on the target server. If any errors occurred, check the portal logs on the target server for extended diagnostic information.

  5. Reset the web content event log.

  6. Restart the server.


Troubleshoot

If items are exported and imported twice between the same servers, and items have been moved or deleted between the first and second export and import, then manually delete these items from the target server before transferring the items again. If this step is not performed, an error like this example is generated:

If you receive 500 errors on ext2 and ext3 versions of Linux, you have exceeded the number of children that a parent folder can hold. We cannot store more than 32768 children under one folder on ext2 and ext3 versions of Linux. Move some content items out of the affected site area to another site area so that none of site areas contain more than 32768 children under one folder and then try exporting again. We can move the content items back to the correct site areas once you have imported the library.


Parent

Maintain web content


Previous

Reset the web content event log
Set service configuration properties


+

Search Tips   |   Advanced Search