Himanshu,
The quick and dirty way of doing that is to dump your database on server A, then import that dump into Postgresql on server B.
On server A:
$ pg_dump openacs > dump.sql
On server B:
$ createdb openacs
$ psql openacs < dump.sql
Finally copy your openacs server directory from server A to server B. Start up aolserver, and that should do it.
- Nick.