Migrating Sun Java Directory Server to HP-UX Directory Server White Paper
14
Schema
The schemas should be migrated before the data, or else schema violations could cause entries to be
skipped during the import process.
Both SJDS and HPDS provide bundled schema to support common directory server usage and schema
used by directory server subsystems. Both support extension of schema by adding additional files
with schema definitions and by adding schema to a designated, user-defined schema file.
Numerous differences exist between schema bundled with SJDS and HPDS. Many of the differences
are schema definitions used to support directory server subsystems that do not need to be migrated.
For example, SJDS uses the object class dsIdentityMapping for SASL mapping configuration
entries, while HPDS uses the object class nsSaslMapping. Because the HPDS SASL subsystem does
not use the dsIdentityMapping object class, the definition does not need to be migrated.
In general, only migrate an extended schema (a schema not originally included with SJDS) to HPDS.
To determine whether the SJDS schema has been extended, compare the directory server instance’s
schema directory to the base schema directory. In the following example, the file 60extra.ldif
has been added to an SJDS instance’s schema directory, and there is also a user-defined schema in
the 99user.ldif file:
# dircmp -s /export/instance1/config/schema /opt/SUNWdsee/ds6/schema | grep -v "^$"
Jan 20 17:00 2010 /export/instance1/config/schema only and /opt/SUNWdsee/ds6/schema only
Page 1
./60extra.ldif
Jan 21 13:53 2010 Comparison of /export/instance1/config/schema /opt/SUNWdsee/ds6/schema
Page 1
different ./99user.ldif
The 99user.ldif file is a special schema file. Whenever a schema is added using the graphical
interface or by performing LDAP modifications on the cn=schema entry, the added schema
definitions will reside in the 99user.ldif file. However, do not simply overwrite the existing HPDS
99user.ldif file, because it will contain ACIs that need to be retained. Instead, rename the HPDS
99user.ldif file to 98user.ldif, and then copy the 99user.ldif file from SJDS.
Alternatively, the three ACIs in the HPDS 99user.ldif file can be copied and pasted into the
migrated SJDS 99user.ldif file.
Keep in mind that extended schema might rely on schema bundled with SJDS. For example, the
schema extension file 60extra.ldif might include an object class definition that depends on
schema definitions appearing in standard SJDS schema files.
In simple cases, to migrate schema from SJDS to HPDS, just copy the schema definition file. For
example, use the following command on the HPDS host:
# scp host1:/export/instance1/config/schema/60example.ldif /etc/opt/dirsrv/slapd-
instance1/schema/
In some cases, the copied schema definition file must be edited, such as to satisfy a dependency on
schema that resides in another file, as previously described. If any schema definitions are incomplete,
HPDS will not start up, and the first problematic schema definition encountered will appear in the
errors log file.