Thursday, November 25, 2010

How we made a complete working test copy of a 465 Gb production UCM environment in under 30 min... Really?

If you want to make a copy of your UCM environment - for testing, staging, upgrade or similar purposes - according to System Migration Guide, you've got to go through these steps:

  • Build and configure a new Content Server instance
  • Install all of your custom components
  • Migrate your existing configuration over (using the Configuration Migration Utility)
  • Migrate your folder structure
  • Export, transfer and import all of your content using Archiver
If you tried to follow these, you must remember the pain of litreally finghting your way through the jungle of almost ever one of these steps. Few of these (if any) do go smoothly from the first attempt. You always find yourself stuck troubleshooting things - be it confuguration differences, archiver errors, settings you forgot to apply... 

So I think it’s fair to say, that if you're tasked with making a working copy of your large production environment - 

You're talking several days of work if you go "traditional" way!

A client has recently approached us asking if they can skip all of these steps and still make it work. Long story short - here's the approach that I've recommend (the one that we used multiple time successfully in the past. And yes, it really took us less then 30 min to make a fully functional standalone copy of our 465 Gb production environment - with dozens of compoenents and custom features)

Here are the instructions that let you make a copy of your environment without having to reinstall Content Server and migrate settings and content.

The only caveat is this - the instance name will have to stay the same, so you won't be able to setup replication from your original to your newly created copy. But that's the only issue.
... and that's not a problem neither for staging nor migration or testing. There're no other drawbacks ... And yes, you should be aslo be able to pull htis off in 11g.

Here's how to do it:


  1. Make a copy of your database into a new instance.
  2. Copy your Content Server installation directory to a new location. (All we had to do is spend 5 min to start rSync the day before.)
  3. Change configuration on your new Content Server - to match its new URL and the new database server/schema
    • Follow instructions below for changing the Content Server URL
    • Use bin/SystemProperties (or Weblogic Console in 11g)  to change your database connection info
  4.  Configure your web server (Instructions for Apache and IIS are below) to talk to your new Content Server - or you can use Content Server Installation Guide for instructions for configuring your web server
  5.  Configure your Content Server and Admin Server on the new machine to start automatically

And here's....

How to Change the Content Server URL by Changing the HttpServerAddress and HttpRelativeWebRoot

These instructions apply to versions 6.2 to 10gR3, any platform.

Change the HttpServerAddress

1. Edit the /config/config.cfg file

2. Change:

HttpServerAddress=

    To:

HttpServerAddress=

3. Save and exit the file

4. Repeat steps 2 and 3 in the /admin/config.cfg file

5. Repeat steps 2 and 3 in the /admin/data/servers//server.hda file

6. Edit the /admin/data/servers/servers.hda file

7. In the ResultSet AdminServers section look for the entry and change it to

8. Save and exit the file

NOTE: If this is a clustered Content Server instance, each cluster node's /admin/data/servers//server.hda file will need to be changed.

9. Restart the Content Server

10. Restart the Admin Server


Change the HttpRelativeWebRoot:

1. Edit the /config/config.cfg file 

2. Change:

HttpRelativeWebRoot=//

    To:

HttpRelativeWebRoot=//

3. Save and exit the file

4. Repeat steps 2 and 3 in the /admin/config.cfg file 

5. Repeat steps 2 and 3 in the /admin/data/servers//server.hda file

NOTE: If this is a clustered Content Server instance, each cluster node's /admin/data/servers//server.hda file will need to be changed.

 6. Restart the Content Server

7. Restart the Admin Server

NOTE: In addition to the HttpServerAddress and HttpRelativeWebRoot, there are other parameters that can be used by the Content Server to set the URL string. These parameters are added in the /config/config.cfg file 

Some of these include:

HttpAbsoluteCgiPath

HttpAbsoluteWebRoot

HttpBrowserFullCgiPath

If any of these parameters are present in the config.cfg file, make the changes to them also.

For a full list of these types of parameters, see the Idoc Script Reference Guide

Web Server changes

If the HttpRelativeWebRoot is changed the web server will need to be modified to reflect that change.

If you run on Apache


1. Edit the /conf/httpd.conf file

Or if it is a specific include file, edit that include file

2. Change:

Alias / "/weblayout"

/

To:

Alias / "/weblayout"

/


3. Save and exit the file



If you run on IIS

In IIS a new Virtual Dirtectory will need to be created

1. In the same Web Site or Default Web Site as the original Content Server Virtual Directory, create a new Virtual Directory.

2. As the Alias enter in the new HttpRelativeWebRoot.

3. Configure the rest of the parameters to match that of the original Virtual Directory.

4. Within the new Virtual Directory and another Virtual Directory, idcplg, needs to be created for the Content Server ISAPI filter.

5. As the Alias enter: idcplg

6. Configure the rest of the parameters to match that of the original Virtual Directory.

7. Restart IIS.

8. The original Virtual Directory can now be deleted.

So there you have it. Now you can make copies of your environment - for staging, data migration, upgrade or testing - the smart way!

And remember, if you ever need a hand with Oracle UCM - just email us. There's no charge for the first day of consulting. Talk to us at contact _at_ stellentExperts _dot_ com

19 comments:

  1. Hi Dmitri,

    You seem to have put tags around all of the 'change xx to yy' parts.
    You may want to replace the < and > with html codes :)

    ReplyDelete
  2. But if you were to upgrade from 6.x+ you would need to follow the first steps.. I wouldn't be confident any other way - its very rare to see any one needing to clone an environment unless there are hardware restrictions on the current environment..

    ReplyDelete
  3. Thanks John

    If you plan on upgrading - cloning your environment is the first thing you should do. Upgrading in place - without proper testing and dry run first is risky and IMHO downright irresponsible. You clone your environment, upgrade it then repeat - until you get it right :)

    As I mentioned, this shortcut is also very helpful for staging, content migration and development.

    Hope that helps

    ReplyDelete
  4. thanks for the tips.
    very helpful

    ReplyDelete
  5. Great article, thanks for your effort.
    Once question that I have, though is, for Windows environments, how do you create the new services? The way you described in your article would have the existing services pointing to the copied UCM instance...

    ReplyDelete
  6. Here's how you install services to start automatically on your new windows machine

    cd bin
    IdcServerNT -install_autostart

    And here's the command for admin server:
    cd ../admin/bin
    IdcAdminNT -install_autostart

    (if that doesn't work - try without underscores. Sorry, typing this on my bb :)

    ReplyDelete
  7. Thanks a lot for all your wonderful tips!!!

    ReplyDelete
  8. Hi Dmitri,

    I like to clone a webcenter contnet instance.
    Waht are the steps I can follow to make a working copy of 5TB WCC production environment.

    Thank you,
    Kuldeep

    ReplyDelete
  9. Are you talking about 11g or 10g?

    ReplyDelete
  10. Hi Dmitri,

    Sorry for the very late response.
    I am talking about 11g.

    Regards,
    Kuldeep

    ReplyDelete
  11. Its about 11g

    ReplyDelete
  12. It's about 11g

    ReplyDelete
  13. 10g actually. For 11g the process would be different and maybe a subject of another post

    ReplyDelete
  14. Hi Dmitri,

    I have read through your blog, We have a similar requirements, we want to migrate our UCM production data from in-premise (DataCenter Hosting) to On-premise ( AWS Cloud ).

    With respect to the environments they would be the same. (11.1.1.7). On-premise environments will have all the UCM/ECM Stack Installed and Configured as required by the application. Only thing that will have to happen is to transfer data between them. Once On-premise is fully setup using data transfer. This would become our new production environment and the In-premise one will be decommissioned.

    Given the above scenario, do you think the we can use the same steps.

    Thanks
    Ashwin

    ReplyDelete
  15. Hello Ashwin

    It might work, but you need to do a dry run first. Try it and verify the results carefully. 11g is different of course. Check out My Oracle Support KB - see what others have done. We're happy to help too, email if you need us.

    ReplyDelete
  16. Hi Dmitri,

    When you say "Copy your Content Server installation directory to a new location. (All we had to do is spend 5 min to start rSync the day before.)". Are you referring to copying wcc folder under domains to new WebLogic installation. Can you please elaborate on it.

    Thank you
    Vasu.

    ReplyDelete
  17. Thanks Vasu

    11g is different and these instructions will be incomplete when dealing with 11g. Please use Contact form or email from ecmsolutions.ca and we will give you a nand

    ReplyDelete