Wednesday, August 13, 2008

21 Steps to recover a corrupted WebSphere Portal Server Part 2

Ok. The continuation of the saga.

Scenario : Data in the database are intact. But Portal is behaving weirdly. First of all, no pages are showing and no pages are accessible and WPSAdmin cannot even access the Administration Page. Secondly, contents are not shown and documents are not shown. Thirdly, it's nearing the launch date.

What we did :

First thing that came to our mind is how are we going to make portal work with all the data inside. We did some troubleshooting but we gave up as there is no point going to the database and find if there's any mapping incorrectly done. So, we decided that, we need to dump all the data.

Based on experience, we should be able to dump the portal by using the migration concept, which is to use the following tools :

XMLAccess to dump the pages and configuration of portal
WPSconfig to dump the Contents
WPMigrate to dump the documents.

Step 1 : I created a file called :ExportRelease.xml based on this link :

Step 2: Run xmlaccess to download the files. I ran :

xmlaccess.bat -in ExportRelease.xml -user wpsadmin -password password -url http://intranet:10038/wps/config -out D:\Backup\PortalConfig.xml

Note that when dumping, use the Portal Port rather than the HTTP Port. HTTP Port produces a timeout which will disconnect the command with the WAS, resulting to an error.

For more information, check this out :

Step 3: Backup the files located at [PortalServer]\deployed\archive. This folder contains all the portlets that was deployed. Note however that updates are not re-deployed on this folder, so you need to re-deploy or update the portlets that has recent changes.

Step 4: Backup the following :

  1. [PortalServer]\Installable
  2. Themes and Skins

Step 5: For our case, since I'm using my own developed desktop SSO Module, I need it for reference but its not require so I did a backup of the security.xml and other security related XML Files. If in doubt, just backup the wp_profile

Step 6 : Remember to backup your application database. This is not the Portal but your own application database. We missed out this part so we have to manually do a recover. We will have another post on how we did that.

Step 7 : We dump the WCM Content (thanks to my WCM Analysts, Mei mei Oen and Julius Soestrisno). Since we have more than 10 libraries, we have to connect to each of the libraries. This is quite a long process but please be referred to :

Basically the command to dump is : WPSconfig.bat export-wcm-data

If you have multiple libraries, you need to do this for all the libraries. If you can't remember your WCM Library name, you can refer to the dumped file PortalConfig.xml and search for all instances of :


Step 8 : Dump the Documents by running this command :

WPmigrate.bat staging-to-production-pdm60-export

Step 9 : For us, since we're very KIASU, we backup the whole IBM Folder and Database

Step 10 : Uninstall Portal and DB2

Step 11 : Re-install Portal and Db2 with the same fixpack level.

Step 12: Transfer Database to Db2

Step 13 : Re-configure Portal Security with AD.

Step 14 : Test and do a backup of all things so that there's a checkpoint in-case the next steps fail

This is it.. next steps is to restore the settings :

Step 15 : run WPSConfig action-empty-portal to empty the portal configuration

Step 16 : Copy back the /archive folder

Step 17 : Copy back the Installabe apps folder and the rest of files (including theme and skins)

Step 18 : Import the configuration by following this commands :

xmlaccess.bat -in PortalConfig.xml-user wpsadmin -password password -url http://intranet:10038/wps/config

Step 19 : Once done, do a login and test. Voila!! We can see now everything. However, web content is still not there so :

Step 20 : Re-import web content by running the command : WPSconfig.bat import-wcm-data. Ofcourse, follow the instructions on this link :

Step 21: Re-import Documents by running the command : WPmigrate.bat staging-to-production-pdm60-import

Voila!!! Done. We manage to revert back everything. Ofcourse we did some manual things like check the security, update the Portlets,etc. but that's it.

Stay tune next time on this scenario : You forgot to backup your DB2 database and your database was uninstalled, but the Datafiles are still there. How do you recover these data files ?.


  1. thanks is a good post, just..

    what do you mean with ...backup
    Themes and Skins

    where can i find it?

  2. to backup theme and skin.. u can backup using webdav..