8.2. About migrate-ds-admin.pl

8.2. About migrate-ds-admin.pl

The migration script, migrate-ds-admin.pl, has flexible options that allow a variety of different migration scenarios, including migrating between different different platforms. This options are listed in Table 8.1, “migrate-ds-admin Options”.

There is one required option with the migration script, oldsroot, which gives the directory path to the old Directory Server. There is also one required argument, General.ConfigDirectoryAdminPwd, which gives the password of the directory administrator for the old Directory Server. If either of these are not supplied, the migration script will exit.

/usr/sbin/migrate-ds-admin.pl --oldsroot /opt/redhat-ds General.ConfigDirectoryAdminPwd=password

NOTE

On Red Hat Enterprise Linux and Solaris machines, the migrate-ds-admin tool is in the /usr/sbin/ directory. On HP-UX machines, the migrate-ds-admin is in the /opt/dirsrv/sbin/ directory.

Option Alternate Options Description
General.ConfigDirectoryAdminPwd=password Required. This is the password for the configuration directory administrator of the old Directory Server (the default username is admin).
--oldsroot -o Required. This is the path to the server root directory in the old 6.x or 7.x Directory Server installation. The default path in 6.x and 7.x servers is /opt/redhat-ds/.
--actualsroot -a This is used for migrating between two machines to specify the real path to the current server root directory in the old 6.x or 7.x Directory Server installation if that directory is mounted on a networked drive or tarballed and moved to a relative directory. In that case, the oldsroot parameter sets the directory from which the migration is run (such as machine_new:/migrate/opt/redhat-ds/), while the actualsroot parameter sets the server root, (/opt/redhat-ds/).
--instance -i This parameter specifies a specific instance to migrate. This parameter can be used multiple time to migrate several instances simultaneously. By default, the migration script migrates all Directory Server instances on the machine.
--file=name -f name This sets the path and name of the .inf file provided with the migration script. The only parameter is the General.ConfigDirectoryAdminPwd parameter, which is the configuration directory administrator's password. Any other configuration setting is ignored by the migration script.
--cross -c or -x This parameter is used when the Directory Server is being migrated from one machine to another with a different architecture. For cross-platform migrations, only certain data are migrated. This migration action takes database information exported to LDIF and imports into the new 8.0 databases. Changelog information is not migrated. If a supplier or hub is migrated, then all its replicas must be reinitialized.
--debug -d[dddd] This parameter turns on debugging information. For the -d flag, increasing the number of d's increases the debug level.
--logfile name -l

This parameter specifies a log file to which to write the output. If this is not set, then the migration information is written to a temporary file, named /tmp/migrateXXXXX.log.

To disable logging, set /dev/null as the logfile.

Table 8.1. migrate-ds-admin Options

migrate-ds-admin.pl allows the password parameter to be provided on the command line, similar to the setup-ds-admin.pl script. The arguments set the section, parameter, and value of .inf parameters in the following form:

section.parameter=value

The only required argument is the Configuration Directory Server administrator password (ConfigDirectoryAdminPwd):

/usr/sbin/migrate-ds-admin.pl --oldsroot /opt/redhat-ds General.ConfigDirectoryAdminPwd=password

To avoid having this password in the clear on the command line, you can use a .inf file with the migration script that gives the administrator's password:

/usr/sbin/migrate-ds-admin.pl --oldsroot /opt/redhat-ds --file=/export/example.inf

The .inf would have the following two lines:

 [General]
 ConfigDirectoryAdminPwd=password

The migration script takes all of the other settings from the old configuration files in the old server root, specified in --oldsroot. Any other argument passed in the command line or listed in an inf file, such as those used with the setup-ds-admin/pl script, is ignored. The Directory Server configuration parameters are only taken from the old instance. It is not possible to change the configuration settings, such as the hostname or port, using the migration script.


Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.