+

Search Tips   |   Advanced Search

Export and import a web content library

We can export the contents of a web content library to disk and import this data into another web content server. This feature enables you to make a backup copy of a web content library, and can also be used to move data between servers. This function cannot be used to send updates, deletes, and moves. It is only suitable for populating new items.

Here is an example export command that exports two WCM libraries from the base portal...

cd $WP_PROFILE/ConfigEngine 
./ConfigEngine.sh export-wcm-data \
                  -Dexport.libraryname="DesktopDesign;DesktopContent" \
                  -DWasPassword=foo \
                  -DPortalAdminPwd=foo

To export all libraries

./ConfigEngine.sh export-wcm-data \
                  -Dexport.allLibraries=true  \
                  -DWasPassword=foo \
                  -DPortalAdminPwd=foo


WCM library export procedure

  1. Log on to dmgr console and go to...

      Resources | Resource Environment | Resource Environment Providers | WCM WCMConfigService | Custom properties

  2. Review export properties...

    export.directory The 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 ${USER_INSTALL_ROOT}/PortalServer/ilwsystem/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 set to true, multiple libraries are written into a single directory specified by the export.directory property. If false, the export task created subdirectories with the name corresponding to each exported library names. For example, if export.directory is specified as /export and the library name is Web_Library, the export task saves the exported library under /export/Web_Library. Set this property to true when exporting multiple libraries containing references between each library.

    Restart the server if change any settings.

  3. Open a command prompt on the source server and export the WCM library.

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

    To run this task against a virtual portal, add one of the following parameters...

    -DVirtualPortalHostName Host name of the virtual portal. For example, vp.example.com.
    -DVirtualPortalContext Virtual portal context that identifies the virtual portal. For example, vp1.

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

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

  5. We can override the export.singledirectory property defined in the WCM WCMConfigService service using the parameter...

      -Dexport.singledirectory

    For example, to save the exported libraries under different directories...

      export-wcm-data -Dexport.singledirectory=false

  6. We can override the export.libraryname property defined in the WCM WCMConfigService service using the parameter...

      -Dexport.libraryname

    For example:

      export-wcm-data -Dexport.libraryname=libraryname

  7. We can override the export.libraryname property defined in the WCM WCMConfigService service by adding the parameter to export all libraries.

      -Dexport.allLibraries=true

    If this option is used, the export may take a long time to finish.

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

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

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


WCM library import procedure

  1. Log in to dmgr console...

      Resources | Resource Environment | Resource Environment Providers | WCM WCMConfigService | Custom 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 the libraries, specify the parent directory where all the exported libraries are located.

    • If you specified false for the export.singledirectory property when you exported the 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 the server after changing this setting.

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

    • Open a command prompt on the target server

    • Import WCM data

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

      By default, this task is performed on the base portal. To run this task on a different virtual portal, identify the virtual portal by adding one of the following parameters to the command line. Each parameter requires the prefix -D on the command line.

      VirtualPortalHostName Host name of the virtual portal. For example, vp.example.com.
      VirtualPortalContext Virtual portal context that identifies the virtual portal. For example, vp1.

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

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

      Differences in paths between versions:

      When exporting from a version 6.1 system, we can specify a folder to export the library to:

        /opt/61/folder/jcr_root

      When importing into version 8.0 from version 6.1, the jcr_root is not required to be specified in the import path:

        /opt/61/folder/

      When exporting from versions 7.0 or higher, the following structure is used:

        /opt/70/folder1/folder2

      When exported, folder2 is automatically generated.

      When importing into version 8.0 from version 7.0 or higher, folder2 is not required to be specified in the import path:

        /opt/70/folder1/

  4. Verify 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.


Troubleshooting

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 the 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: Export and import web content libraries