Use one of the following options to specify whether to use online or preview mode:
-a AuditLDIFFile directs commdirmig to write the migration audit to the LDIF-formatted file you specify. The directory entries are not changed. Choose this option to perform a dry run of the migration.
If you want to run the utility in preview mode, do not specify the -o option.
By default, commdirmig runs in preview mode (writes the migration audit to the LDIF file). It does not migrate the directory data online.
where n is a random number appended to the file name when the LDIF file is generated. The appended number makes the file name unique, which prevents the utility from overwriting any existing LDIF file. For example:
A new AuditLDIFFile is created whenever the maximum audit LDIF file size is exceeded. The file size is set by the -m LogMaxSize option.
The default paths for the AuditLDIFFile are as follows:
commdirmig -a /home/user/migration.audit.ldif
Use one of the following options to specify the domains to be migrated:
-d “*” specifies all domains in the LDAP directory. You must enclose the asterisk in quotes or use the Escape character before the asterisk.
In a DomainFile, you also can specify a preferred mail host associated with a specified domain. This option is used as the mail host when mail service is added to users and groups in the domain.
Formatting the Domain File
To specify an associated mail host, start a new line and type the option letter H, then a space, then the mail host name.
Separate each specified domain with a blank line.
Do not type a dash (-) before the option letters.
In the following example, a DomainFile named domainnames.txt specifies three domains to be migrated and their associated mail hosts to be used for new mail services:
d Domain1 H host1.siroe.com
d Domain2 H host2.sesta.com
d Domain3 H host3.siroe.com
commdirmig -d sesta.com, siroe.com, varrius.org
commdirmig -d *
commdirmig -f /home/user/domainnames.txt
Use the following arguments to add mail and Calendar services:
-S mail adds new mail services to the directory.
-H MailHost specifies the mail host to be used to add mail services to users and groups.
When you use -S mail to add mail services, -H MailHost is required.
-S cal adds new Calendar services to the directory.
commdirmig -S mail -H host1.siroe.com
commdirmig -S mail, cal -H host1.siroe.com
-i InputFile directs commdirmig to read a user-created text file, InputFile, which contains a list of commdirmig options and arguments. commdirmig uses the information in the file to migrate the directory.
The command-line version of an option overrides the InputFile version of the same option. That is, if you enter an option in the command line and the same option exists in the InputFile, commdirmig uses the command-line option and ignores the option in the InputFile.
The InputFile is a new-line separated ASCII text file. For each option to be specified in the InputFile, type the option letter, then a space, then the option arguments. Do not type a dash (-) before the option letters.
In the following example, an InputFile named commdirmig.input.txt specifies the Directory Server login ID and a file containing the password of the Directory Server user, the Directory Server host name and port number, and the OSI root and DC root:
D "cn=Directory Manager" w /opt/SUNWcomm/passwd X ldaphost p 389 b "o=isp" r "o=internet"
If you use this option, you do not have to type all the options in the command line when you run the utility. Also, you can edit and reuse the InputFile, which makes it easier to run the utility multiple times. For example, you can do the following:
Run the utility once to migrate a test directory and later to migrate the production directory.
Migrate several domains, one at a time.
Before you reuse the file, alter the -d or -f option to point to the domains or the directory you intend to migrate.
Migrate to Schema 2, compatibility mode, and later to Schema 2, native mode. Before you perform the second migration, alter the -t option to specify the correct target Schema version and mode.
commdirmig -i /home/user/commdirmig.input.txt
500 K2 M
When you run commdirmig for the first time, the -m option is saved in a configuration file, commdirmig-userprefs.properties. When you run commdirmig again, it uses the option values stored in the configuration file. For details, see commdirmig Configuration File.
If an error occurs during the migration, you can use the ldapmodify tool with the Undo log to roll back all the changes made by commdirmig. This step returns the LDAP directory to the state it was in before the migration began.
By default, commdirmig creates an Undo file.
By default, the UndoFile is named commdirmig.undo.ldif.