[389-users] Best practice of taking a backup of current LDAP and restore that into a new server

Fosiul Alam fosiul at gmail.com
Wed Aug 8 14:23:02 UTC 2012


Hi thanks
but thats not giving me result of all the groups this user belong to ??

will really appropriate your help.
Fosiul.


On Wed, Aug 8, 2012 at 2:36 PM, Grzegorz Dwornicki <gd1100 at gmail.com> wrote:
> Ldapsearch -x '(memberuid=jsmith)'
>
> This will not return user primary group.
>
> Greg.
>
> Send from htc desire z
>
> 08-08-2012 15:27, "Fosiul Alam" <fosiul at gmail.com> napisał(a):
>
>> Hi thanks
>>
>> Just  a quick qustion
>> is there any ldapcommand which will give me a list of groups a user belong
>> to ??
>>
>> Supppose I want to see all the groups list a user call jonh smith belong
>> to ??
>> thanks
>>
>> On Wed, Aug 8, 2012 at 2:05 PM, Michael R. Gettes <gettes at pobox.com>
>> wrote:
>> > to get a backup of just the data - the simplest thing to do is to use
>> > db2ldif (documented well in the various versions).  you can use the GUI
>> > to
>> > do an export which uses db2ldif under the covers.  db2ldif has various
>> > capabilities to include and exclude portions of the tree.  ldif2db is to
>> > import.  also well documented.  i do this all the time.  it's really
>> > easy.
>> >
>> > /mrg
>> >
>> > On Aug 8, 2012, at 9:01, Grzegorz Dwornicki wrote:
>> >
>> > You can run this in many ways for example:
>> >
>> > Ldapsearch -D "cn=Directory Manager" -W -b
>> > ou=Users,l=uk,dc=fosiul,dc=lan
>> > Ldapsearch -D "cn=Directory Manager" -W -b
>> > ou=Groups,l=uk,dc=fosiul,dc=lan
>> >
>> > This way you get 2 results in ldif format. But you can try something
>> > like
>> > this:
>> >
>> > Ldapsearch -D "cn=Directory Manager" -W -b l=uk,dc=fosiul,dc=lan
>> > '(I(objectclass=person)(ou=Groups)(ou=Users)(objectclass=posixgroup))'
>> >
>> > I used "I" in ldapfilter because could not find pipe character on my
>> > phone
>> > please use pipe character known from bash instead. Sorry for trouble.
>> >
>> > This command should give the same result as ones provided ealier, but in
>> > one
>> > query. I am asking for all ldap content and filter it aginst persons,
>> > posixgroups and users/groups containers.
>> >
>> > What i ment is you can do this task in many ways :)
>> >
>> > Greg.
>> >
>> > Send from z htc desire z
>> >
>> > 08-08-2012 14:35, "Fosiul Alam" <fosiul at gmail.com> napisał(a):
>> >>
>> >> Hi thanks
>> >>
>> >> my ldap is like this
>> >>
>> >> l=uk,dc=fosiul,dc=lan
>> >>
>> >> then it has OU=Users
>> >> OU=Grups
>> >>
>> >> what shall be the command  for bellow ?
>> >> (Just run ldapseach as dirctory manger with criteria/filters/basedn you
>> >> want. )
>> >>
>> >> On Wed, Aug 8, 2012 at 1:33 PM, Grzegorz Dwornicki <gd1100 at gmail.com>
>> >> wrote:
>> >> > Yes i told you how in ealier mail.
>> >> >
>> >> > Just run ldapseach as dirctory manger with criteria/filters/basedn
>> >> > you
>> >> > want.
>> >> > Next pipe or copy results to file. Maybe use sed on the file to make
>> >> > litle
>> >> > changes of needed. Copy it to second server and use ldapadd on it.
>> >> >
>> >> > Greg.
>> >> >
>> >> > Send from z htc desire z
>> >> >
>> >> > 08-08-2012 14:25, "Fosiul Alam" <fosiul at gmail.com> napisał(a):
>> >> >
>> >> >> Hi
>> >> >> Is there any way to make ldif from production server
>> >> >> then  run this on this test server??
>> >> >>
>> >> >> Fosiul
>> >> >>
>> >> >> On Wed, Aug 8, 2012 at 1:03 PM, Grzegorz Dwornicki
>> >> >> <gd1100 at gmail.com>
>> >> >> wrote:
>> >> >> > Hi
>> >> >> >
>> >> >> > I'm not sure about your second server, does it need to have same
>> >> >> > base
>> >> >> > tree.
>> >> >> > I think yes it needs. Because admin console and shell 389 backup
>> >> >> > tools
>> >> >> > make
>> >> >> > copy of database files not in ldif format. If your second server
>> >> >> > have
>> >> >> > diferent tree you can use sed + ldapsearch to extract data.
>> >> >> >
>> >> >> > Consider also this: The best way to sync two or more ldap servers
>> >> >> > is
>> >> >> > replication.
>> >> >> >
>> >> >> > Greg.
>> >> >> >
>> >> >> > wiadomosc wyslana z htc desire z
>> >> >> >
>> >> >> > 08-08-2012 13:41, "Fosiul Alam" <fosiul at gmail.com> napisał(a):
>> >> >> >>
>> >> >> >> Hi
>> >> >> >> I have a running Fedora 389 Server
>> >> >> >>
>> >> >> >> I want to create a test server but i want to have the same data
>> >> >> >> from
>> >> >> >> My production server
>> >> >> >>
>> >> >> >> So i am thinking
>> >> >> >> if i take a backup of production server
>> >> >> >>
>> >> >> >> then create a a new 389 instances then restore from that backup
>> >> >> >> in
>> >> >> >> to
>> >> >> >> new 389 instance
>> >> >> >> will it work ??
>> >> >> >>
>> >> >> >> Thanks for your help.
>> >> >> >>
>> >> >> >> Fosiul
>> >> >> >> --
>> >> >> >> 389 users mailing list
>> >> >> >> 389-users at lists.fedoraproject.org
>> >> >> >> https://admin.fedoraproject.org/mailman/listinfo/389-users
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > 389 users mailing list
>> >> >> > 389-users at lists.fedoraproject.org
>> >> >> > https://admin.fedoraproject.org/mailman/listinfo/389-users
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Regards
>> >> >> Fosiul Alam
>> >> >> 07877100621
>> >> >> http://www.fosiul.co.uk
>> >> >> --
>> >> >> 389 users mailing list
>> >> >> 389-users at lists.fedoraproject.org
>> >> >> https://admin.fedoraproject.org/mailman/listinfo/389-users
>> >> >
>> >> >
>> >> > --
>> >> > 389 users mailing list
>> >> > 389-users at lists.fedoraproject.org
>> >> > https://admin.fedoraproject.org/mailman/listinfo/389-users
>> >>
>> >>
>> >>
>> >> --
>> >> Regards
>> >> Fosiul Alam
>> >> 07877100621
>> >> http://www.fosiul.co.uk
>> >> --
>> >> 389 users mailing list
>> >> 389-users at lists.fedoraproject.org
>> >> https://admin.fedoraproject.org/mailman/listinfo/389-users
>> >
>> > --
>> > 389 users mailing list
>> > 389-users at lists.fedoraproject.org
>> > https://admin.fedoraproject.org/mailman/listinfo/389-users
>> >
>> >
>> >
>> > --
>> > 389 users mailing list
>> > 389-users at lists.fedoraproject.org
>> > https://admin.fedoraproject.org/mailman/listinfo/389-users
>>
>>
>>
>> --
>> Regards
>> Fosiul Alam
>> 07877100621
>> http://www.fosiul.co.uk
>> --
>> 389 users mailing list
>> 389-users at lists.fedoraproject.org
>> https://admin.fedoraproject.org/mailman/listinfo/389-users
>
>
> --
> 389 users mailing list
> 389-users at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/389-users



-- 
Regards
Fosiul Alam
07877100621
http://www.fosiul.co.uk



More information about the 389-users mailing list