Anyway, there are three steps...
- Extract your data... here is the ldifde way
ldifde -f {filename} -s {server} -t {port} -d "CN=schema,CN=configuration,CN={adam_guid}" -r {custom object searhc filter}
- Prune the unwanted attributes
In the following section it should all be read as a single regex (ignore line breaks). It should be used in a substitution statement where nothing is substituted for the match.
^(distinguishedname|instancetype|whencreated|whenchanged| usncreated|usnchanged|name|objectguid|schemaidguid|objectcategory|msds-intid) ::? [^\n]*\n( [^\n]+\n)*
- Replace the AD/AM GUID to make it really easy to import into a target environment change the GUID in the file to something easy to type that is not repeated elsewhere in the file.