Monday, April 20, 2020

[389-users] Re: Exporting to LDIF

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEOjtDOPXdIVAWcUziyeav2MG3z/wFAl6d3VkACgkQyeav2MG3
z/w58A//Wi3BZ3PGMd+l1ji1gHYSIuWzhLAYKSYVHMKmRiZ2YtZNsnF1zYWVfF5i
npYCYZdJ4uOAu3Q8Qsf3o0HHeDL1ndwczaj6d5Gq+aWv/FyUUE7TWhno5ZGqsWmA
waJpD0tLf5e4hshCbDpSIer78il63pg8zxhv6+ntjlvK//O664MJpNTwnxGoiaTq
Twxrzx+ewTVmzP+YDfdktNBBpcP0Ft2l7oOsYVEhzjtymnqsEgRizPInXtnSmNHc
ADo2PC4WFtv72waELctgzBfHHyJPsUuQsBoan+i5mDMJE/mBRx5lux3jWVHzWTKB
97bJ0t4liQ/EH/fBscjAdO2y6xF1EyaOZneYf7LMbZcrtLhkybrqIzYu/VwzxM1w
zmnjhVDk/xKrigy6fy7IttJlpiK5VCKi7KAuw7vbsORtTmVyulV22NGFebAHK4sh
p+Eyx/o/JtD8rcTpHYBSGD2pwzNnLtw5zMe7U1MekzsEaN67mzuWwjYSXOQdAlBH
sryaqFm7pPP/q4ghszxs4h1VnPjSuqDAwwY+mx+OBg8YhtDovCpSIdqhHZDZ7Zb/
qgCSzi2TqTgKZ/w62BHkZAtxpx1rihSMH8mHp7CeWG3D5K2iCxqAXLa8wcHPhnPA
gU3yvVxSlYVe3hcC46uxkEa/znrQMXkiporSP4N9iP/ufhgvFXU=
=Rfsu
-----END PGP SIGNATURE-----
Hi William,

On 20.04.20 at 01:17 William Brown wrote:
>> On 17 Apr 2020, at 18:38, Johannes Kastl <kastl@b1-systems.de> wrote:

>> This one mentions creating a task, but the example does not work out of the box:
>>> https://access.redhat.com/documentation/en-us/red_hat_directory_server/10/html/administration_guide/populating_directory_databases-exporting_data

Actually I got that working:

Create a file export_to_ldif_20200420.ldif:
--- cite ---
dn: cn=task_name,cn=export,cn=tasks,cn=config
objectclass: extensibleObject
cn: task_name
nsInstance: userRoot
nsFilename: /tmp/export.ldif
--- /cite ---

Then run the following command:
ldapadd -D "cn=Directory Manager" -W -H ldaps://YOUT_HOSTNAME_GOES_HERE -x -f
export_to_ldif_20200420.ldif

Voila:
# ll /tmp/export.ldif
-rw------- 1 dirsrv dirsrv 15043 Apr 20 17:24 /tmp/export.ldif
#

> Modern 389-ds no longer ships db2ldif, you need to use `dsctl <instance> db2ldif`

OK, thanks for that information.

Is there a section in the wiki for these kinds of things? If not, I would
volunteer to write a small summary.

Kind Regards,
Johannes


--
Johannes Kastl
Linux Consultant & Trainer
Tel.: +49 (0) 151 2372 5802
Mail: kastl@b1-systems.de

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg
http://www.b1-systems.de
GF: Ralph Dehner
Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537

No comments:

Post a Comment