Migrating Sun Java Directory Server to HP-UX Directory Server White Paper
21
Appendix B: sjdsmig.pl Script
The sjdsmig.pl script automates certain migration tasks that would otherwise be time-consuming to
perform by hand. It can run in one of two modes: either data migration or configuration migration.
Once you have installed HP-UX Directory Server B.08.10.02 (or later), you can obtain a copy of the
sjdsmig.pl script from /opt/dirsrv/contrib on your system.
Script Options
sjdsmig.pl data -i <file> -s <file> -d <file> -o <file> [-l <file>] [-p]
[-v]
sjdsmig.pl cfg -d <file> -o <file> [-p]
Parameter Description
data
Specifies that the migration is to run in data conversion mode.
cfg
Specifies that the migration is to run in configuration conversion mode.
-i <file>
Specifies the user data input LDIF file to be converted; this file was created by exporting an SJDS
instance.
-s <file>
Specifies the password policy assignments search results file that was created by running an LDAP
search against an SJDS instance.
-d <file>
Specifies the dse.ldif configuration input file that was copied from an SJDS instance.
-o <file>
Specifies the migration output file.
In data migration mode, this is a converted copy of the input data LDIF file, suitable for import into
HPDS.
In configuration migration mode, this is an LDIF change file that can be used with the ldapmodify
tool to update HPDS configuration settings.
-p
Removes password policy information instead of migrating it. Local password policy entries will not
be removed, as they may be providing structure for the data. Those entries should not have any
effect after using the -p option, as any specifiers that point to the local password policy entry will be
removed from user and CoS entries.
-v
Specifies verbose logging for data migration.
-l <file>
Specifies that migration changes be logged to the specified file instead of to the default file
migration_log.txt.
Script Dependencies
The sjdsmig.pl script is a Perl script that relies on the Net::LDAP module for LDIF manipulation.
The minimum versions of the dependencies that the script requires are Perl 5.8.2 and Net::LDAP
0.26. Higher versions should also work, with the exception of Net::LDAP 0.34.
Net::LDAP comes bundled with Perl in the package provided by HP that is part of the HP-UX
Operating Environment, and also available as a web download. To determine the version of Perl that
is installed, run the following command:
# /opt/perl_64/bin/perl –v
To determine the version of Net::LDAP installed on an HP-UX system, run the following command:
# /opt/perl_64/bin/perl -e 'use Net::LDAP; print $Net::LDAP::VERSION, "\n"'
To update Perl, please see the packages available for download at http://www.hp.com/go/perl.