Search This Blog

Wednesday, November 10, 2010

Steps required to export WCM Library

IBM Workplace Web Content Management (WCM) 6 provides a way that you can export and import data from libraries. This can be useful as a way to backup data for safety - especially in the early days of development.
For example, before more robust data backup and restore procedures can be trusted, you might leverage this mechanism. It is also a way that you can get data from one server to another such as from a team DEV server to your local DEV server.

(Note that Syndication, not data export/import is the proper way to keep WCM content synchronized between servers on a regular basis. This describes a backup or data move procedure, not syndication for data synchronization.)

This procedure assumes that you have already configured the data export options in the WCM data export configuration file. This is intended to simply document a quick checklist style procedure for executing new data exports on a regular basis.
  • Use PuTTY to login to the server (on SSH connection if necessary)
  • Change directory: cd /usr/IBM/WebSphere/wp_profile/PortalServer/wcm/config
    • If you list the contents of this directory (ls -la), you should see a file called wcm60_conf.xml. This is the file where the WCM data export options are configured. We will need to modify this file, so let's make a backup for safety first.
  • Backup the config file by making a dated copy. For example:
    • cp wcm60_conf.xml wcm60_conf_2009_09_24.xml
  • Use VI to open the file:
    • vi wcm60_conf.xml
  • The first thing we want to do is change the date in the name of the export directory (first config line in the file). We will change the following line, for example from:
    • <property name="ExportDir" value="/usr/IBM/WebSphere/wp_profile/PortalServer/wcm/config/22Sept2009export"/>
    • to...
    • <property name="ExportDir" value="/usr/IBM/WebSphere/wp_profile/PortalServer/wcm/config/24Sept2009export"/>
  • Note that there is also a line in the file that defines the libary to export. It looks like this:
    • <property name="WebLib" value="Content"/>
  • We can leave that alone for now and export the Content library first. But to export other libraries, we will need to change the library name and run the export command again.
  • In VI, use [ESCAPE] to exit edit mode, then :wq (write, quit). If necessary, you can skip making changes to the file with :q! (quit, but ignore changes).
  • Now that we've saved the file, we can execute the export command.
  • cd /usr/IBM/WebSphere/wp_profile/ConfigEngine
  • ./ConfigEngine.sh export-wcm-data
  • The data will begin to export and you will get a lot of information on the console. Hopefully, the console messages will end with a BUILD SUCCESSFUL message. You will then have all the data exported from the library in the directory you specified and you can later import that data if necessary.
  • Now you can cd back to the directory containing the config file, use VI to change the library name to export, and repeat the process for each library you wish to export.

Some Quick Tips for using the VI editor:
k = up
j = down
w = right or forward one word
b = left or back one word
l = right 1 char
h = left 1 char
x = delete 1 char
u = undo
i = insert
[ESCAPE] = get out of edit mode
:wq = write and quit
:q! = quite ignoring changes (do not write).

Hope this article will be useful...

No comments:

Post a Comment