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

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