By: Alejandro Calderon user 20 Jan 2021 at 11:59 a.m. CST

7 Responses
Alejandro Calderon gravatar
Hi there, I've been trying to create a .ldif backup file following the instructions here: https://gluu.org/docs/gluu-server/4.1/operation/backup/ But when I run the command `opt/opendj/bin/ldapsearch -h localhost -p 1636 -Z -X -D "cn=directory manager" -w <password> -b 'o=gluu' -T 'oxAuthGrantId=*' dn | grep 'dn:' | wc -l` it asks me for the *password for user 'cn=Directory Manager*' (the same I use for oxTrust), I type the LDAP superuser password and I always get this error: ``` You have provided options for scheduling this operation as a task but options provided for connecting to the server's tasks backend resulted in the following error: 'Connect Error' ``` Do you have any idea of what it could be? Kind regards!

By Michael Schwartz staff 20 Jan 2021 at 12:17 p.m. CST

Michael Schwartz gravatar
Remove `-T` Also, instead of `-w password` write the password to a file and use something like `-j ~/.pw`... then remove the password file. You don't want the DM password in your bash_history.

By Mobarak Hosen Shakil staff 20 Jan 2021 at 1:28 p.m. CST

Mobarak Hosen Shakil gravatar
Hi Alejandro Calderon! try this command: ``` /opt/opendj/bin/export-ldif --hostname "localhost" --port 4444 --bindDN "cn=Directory manager" --bindPassword "pwd" --backendID userRoot --ldifFile ./backup.ldiff --trustAll ``` It will export data into `/opt/opendj/backup.ldiff` file. Thanks & Regards Shakil

By Alejandro Calderon user 20 Jan 2021 at 1:53 p.m. CST

Alejandro Calderon gravatar
I did what you said, Michael, and I'm still having an error: ``` The LDAP search request failed: 91 (Connect Error) Additional Information: Connection refused 0 ``` On the other hand, when I'm trying to implement the export command: `/opt/opendj/bin/export-ldif -n userRoot -l ldap-backup-01-20-2021.ldif`, it asks me for the password for user 'cn=Directory Manager' and I have the error: ``` Password for user 'cn=Directory Manager': You have provided options for scheduling this operation as a task but options provided for connecting to the server's tasks backend resulted in the following error: 'Connect Error' ```

By Mobarak Hosen Shakil staff 20 Jan 2021 at 1:59 p.m. CST

Mobarak Hosen Shakil gravatar
Did you try this command? ``` /opt/opendj/bin/export-ldif --hostname "localhost" --port 4444 --bindDN "cn=Directory manager" --bindPassword "pwd" --backendID userRoot --ldifFile ./backup.ldiff --trustAll ```

By Alejandro Calderon user 20 Jan 2021 at 3:28 p.m. CST

Alejandro Calderon gravatar
Yes sir, and and I got this: ``` You have provided options for scheduling this operation as a task but options provided for connecting to the server's tasks backend resulted in the following error: 'Connect Error' ```

By Mobarak Hosen Shakil staff 20 Jan 2021 at 3:48 p.m. CST

Mobarak Hosen Shakil gravatar
Sorry, I forgot to menthon, In that case, opendj status should be online. > `/opt/opendj/bin/export-ldif --hostname "localhost" --port 4444 --bindDN "cn=Directory manager" --bindPassword "pwd" --backendID userRoot --ldifFile ./backup.ldiff --trustAll` but you can try this command since opendj offline: ``` /opt/opendj/bin/export-ldif -n userRoot --offline -l backup.ldif ```

By Alejandro Calderon user 20 Jan 2021 at 4:41 p.m. CST

Alejandro Calderon gravatar
Cool!! Both of them online and offline commands, work perfectly, Thank you so much.