Transferring Messaging Server Configuration Data to a New Directory Server Host Without Reinstalling Messaging Server

Transferring Messaging Server Configuration Data to a New Directory Server

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.

Migration Assumptions

This document makes the following assumptions:

Reasons for Installing a New Directory Server

You might need to move your Directory Server and, thus, to migrate your Messaging Server configuration data, in the following situations:

Types of Messaging Server Data to Migrate

When you install a new Directory Server, you must move the following Messaging Server data:

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.

The Key Condition for Using This Document!

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.

Messaging Server Versions

The Messaging Server version you are running may determine whether you need to use this document:

What Should You Do?

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.

ProcedureTo Transfer Messaging Server Configuration Data to a New Directory Server

The following migration steps are generic and conceptual. Your particular deployment may require modifications.

  1. Install the new Directory Server, if you have not already done so.

  2. 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

    Note –

    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.


  3. Extract the Messaging Server configuration data from the original (source) Directory Server.

    1. Put the configuration data into an LDIF file:


      /path-to-slapd-instance/db2ldif -s o=NetscapeRoot > /var/tmp/nsroot.ldif
    2. 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
  4. 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.)

  5. Import the Messaging Server configuration data into the newly installed Directory Server.

    1. Transfer the file mods.ldif onto the machine that hosts the new Directory Server.

    2. To add the new information to the new Directory Server, run the following command:


      ldapmodify -a -c -f mods.ldif
  6. 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.

  7. Start Messaging Server.


    path-to-startupscript/start-msg ha