This document describes how to migrate Messaging Server configuration data when you install a new Directory Server. It is assumed that Messaging Server stores its configuration data on the Directory Server being upgraded or moved to a new host.
This technical note contains the following sections:
Version |
Date |
Description of Changes |
---|---|---|
2 |
August 2006 |
Revision to apply this technical note to Messaging Server 6. |
1 |
September 2003 |
Initial release of this technical note. |
This section explains why you might need to transfer Messaging Server data, lists the types of data to be migrated, and specifies the key conditions that determine which migration steps to follow.
Because each Messaging Server deployment is different—for example, all servers may be in a stand-alone configuration, or they may be in a replicated configuration—we will only describe the general concepts, goals, and procedures in migrating Messaging Server configuration data between Directory Server hosts. You may have to modify these procedures for your own Messaging Server system.
This document makes the following assumptions:
You have an existing Messaging Server installation that uses Directory Server to store user and configuration data.
You want to avoid upgrading or reinstalling Messaging Server.
You are installing a new Directory Server into a different host, or, if installing on the same host, you are installing the Directory Server software into a different server root path than the one used by the Directory Server.
You might need to move your Directory Server and, thus, to migrate your Messaging Server configuration data, in the following situations:
You want to upgrade Directory Server.
You might be upgrading Directory Server from one version to another—for example, from iPlanet Directory Server 5.x to Sun Java System Directory Server 6.x.
You want to replace the original Directory Server host machine with a new machine.
You might reinstall Directory Server on a new host–without necessarily upgrading the software—when you need to modify the topology of your entire deployment. For example, you may be enlarging your deployment to encompass multiple hosts, and need to point Messaging Server to a new Directory Server host.
Or you may need to move Directory Server from one machine to another because you are upgrading hardware.
When you install a new Directory Server, you must move the following Messaging Server data:
User/group data
Personal address book (PAB) data
Messaging Server configuration data
Messaging Server Domain Component (DC) tree. This applies only if you use a Schema 1 directory structure.
Personal Information Store Database (PiServerDB)
Communications Express stores personal address-book data in LDAP entries under the distinguished name (DN) o=PiServerDB.
Migrating user/group, PAB, and DC tree data to a new Directory Server is a relatively simple task: you take user and PAB LDIF data from the original Directory Server and load it into the target Directory Server.
Migrating Messaging Server configuration data is much more problematic. This is the subject of this technical note.
Messaging Server configuration data is stored under the DN o=netscaperoot. Directory Server skips over this DN when a Directory Server migration occurs.
For this reason, you cannot use standard Directory Server methods to migrate the configuration data. Instead, you must follow the steps in this document.
The Messaging Server version you are running may determine whether you need to use this document:
All versions of Messaging Server prior to version 6.0 store their data in the o=netscaperoot suffix.
Messaging Server 6.0, 6.1, and 6.2 (Sun ONE Messaging Server and Sun Java System Messaging Server) can store configuration data under the DN o=comms-config. Configuration data stored under this DN can be migrated using standard methods.
Messaging Server 6.3 stores configuration data in local files, not in the LDAP directory. If you are using Messaging Server 6.3 , this document will no longer apply.
Find out where your Messaging Server configuration data is located in the directory.
Run the configutil program to obtain the value of the local.ldapsiedn parameter, which shows the location of the configuration data. For details, see Step 2 in the procedure below.
If the configuration data is under the DN o=netscaperoot, follow all the steps in the procedure below.
If the configuration data is under the DN o=comms-config, you can use standard Directory Server methods and tools to migrate the data.
The following migration steps are generic and conceptual. Your particular deployment may require modifications.
Install the new Directory Server, if you have not already done so.
Find the location of the Messaging Server configuration data from the old Directory Server.
The configuration parameters are stored under the DN defined by the local.ldapsiedn parameter in the msg.conf configuration file. Determine the value of local.ldapsiedn by running the configutil utility. This value is depicted in Figure 1.
Figure 1. Location of Messaging Server Configuration Data on Old Server
o=NetscapeRoot ou=AdminDomain cn=lion.varrius.org cn=Server Group cn=Sun ONE Messaging Suite cn=msg-config Configuration Data --> { . . . } |
Example:
dn: cn=msg-sesta, cn=iplanet messaging suite, cn=Server Group, cn=messaging1.siroe.com, ou=AdminDomain, o=netscapeRoot |
For Messaging Server 6.0 (Sun ONE Messaging Server) and later versions, the configuration information may be located under the root suffix o=comms-config instead of under o=NetscapeRoot.
If your ldapsiedn is located under o=comms-config, you can follow the normal migration procedures using the Directory Server migration tools.
Extract the Messaging Server configuration data from the original (source) Directory Server.
Put the configuration data into an LDIF file:
/path-to-slapd-instance/db2ldif -s o=NetscapeRoot > /var/tmp/nsroot.ldif |
Unfold the wrapped lines in the nsroot.ldif file.
The ldapsearch command wraps lines at 78 characters. Unwrap the lines and replace the server_group_name using the utility shown in Code Example 1. Save the output to a file—for example, mods.ldif.
Code Example 1. Unwrap Lines
#!/usr/bin/perl $USAGE = "Usage: $0 your_ldif_input_file [ldif_output_file]\n"; $input_file = shift || die $USAGE ; $output_file = shift || ?-?; # write to STDOUT by default local $/ = ""; # set the record separator to paragraph mode open(OUTFH, ">$output_file") || abort("ERROR: Unable to open $output_file for writing"); open(LDIFFILE, "$input_file") || abort("ERROR: Unable to open $input_file for reading "); while (defined( $_ = <LDIFFILE>)) { s/\n //g; # unfold the lines next unless ( $_ =~ /o=NetscapeRoot\n/); # skip unless o=netscaperoot next if (s/slapd-//g); # skip slapd entries s/\nuniquemember: cn=Netscape Directory Server//g; # rm this unique member next if (s/Netscape Directory Server//g); # skip Dir Server entries print OUTFH "$_" ; # print to the output file } close (LDIFFILE); close (OUTFH); undef $/;
If you save the above perl code as unwrap.pl, you can run it as follows:
perl unwrap.pl /var/tmp/file.ldif /var/tmp/mod.ldif |
Add the updated schema on the newly installed Directory Server.
Obtain the comm_dssetup.pl utility and install it on the newly installed Directory Server.
This utility is generally found as the package SUNWcomds. You can find it in the distribution that includes Directory Server or the distribution that contains Messaging Server.
Run perl comm_dssetup.pl against the newly installed Directory Server. (Make sure that the new Directory Server is running.)
Import the Messaging Server configuration data into the newly installed Directory Server.
Transfer the other directory data into the new Directory Server.
If you are upgrading your Directory Server, run the migrateInstance utility provided with the new Directory Server.
If you are not upgrading your Directory Server, or if you want to use another data-migration method, use that method now to transfer the data.
If you are migrating a user/group and PAB directory, transfer the user/group and PAB data from the old Directory Server to the new one.
Migrating user/group and PAB data to the new Directory Server is a simple task. Take the user/group and PAB LDIF data from the old Directory Server and load it into the new Directory Server.
Start Messaging Server.
path-to-startupscript/start-msg ha |
The Sun web site provides information about the following additional resources:
Documentation (http://www.sun.com/documentation/)
Support (http://www.sun.com/support/)
Training (http://www.sun.com/training/)
Third-party URLs are referenced in this document and provide additional, related information.
Sun is not responsible for the availability of third-party web sites mentioned in this document. Sun does not endorse and is not responsible or liable for any content, advertising, products, or other materials that are available on or through such sites or resources. Sun will not be responsible or liable for any actual or alleged damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods, or services that are available on or through such sites or resources.
Sun is interested in improving its documentation and welcomes your comments and suggestions. To share your comments, go to http://docs.sun.com and click Send Comments. In the online form, provide the full document title and part number. The part number is a 7-digit or 9-digit number that can be found on the book's title page or in the document's URL. For example, the part number of this book is 819-6839-11.