Migrate LDAP from one machine to another











up vote
1
down vote

favorite
1












My current task is to migrate the content from one machine (source) to another (target). Both machines are identical. One is heavily used and the other is clean.



I already have all the files that are different between both machines and what files are not in the target (they must be copied from the source).



The problem is, how should I transfer the LDAP data?



Is that just a copy from one side to another or should I dump some data from some place and then reload it in the target?



Any good documentation on how to do that? I couldn't find any.



Note: I will worry about other stuff like DB later. Right now, my headache is LDAP.










share|improve this question






















  • Here is similar with a good answer stackoverflow.com/questions/792563/…
    – StefanR
    Dec 14 '15 at 11:43















up vote
1
down vote

favorite
1












My current task is to migrate the content from one machine (source) to another (target). Both machines are identical. One is heavily used and the other is clean.



I already have all the files that are different between both machines and what files are not in the target (they must be copied from the source).



The problem is, how should I transfer the LDAP data?



Is that just a copy from one side to another or should I dump some data from some place and then reload it in the target?



Any good documentation on how to do that? I couldn't find any.



Note: I will worry about other stuff like DB later. Right now, my headache is LDAP.










share|improve this question






















  • Here is similar with a good answer stackoverflow.com/questions/792563/…
    – StefanR
    Dec 14 '15 at 11:43













up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





My current task is to migrate the content from one machine (source) to another (target). Both machines are identical. One is heavily used and the other is clean.



I already have all the files that are different between both machines and what files are not in the target (they must be copied from the source).



The problem is, how should I transfer the LDAP data?



Is that just a copy from one side to another or should I dump some data from some place and then reload it in the target?



Any good documentation on how to do that? I couldn't find any.



Note: I will worry about other stuff like DB later. Right now, my headache is LDAP.










share|improve this question













My current task is to migrate the content from one machine (source) to another (target). Both machines are identical. One is heavily used and the other is clean.



I already have all the files that are different between both machines and what files are not in the target (they must be copied from the source).



The problem is, how should I transfer the LDAP data?



Is that just a copy from one side to another or should I dump some data from some place and then reload it in the target?



Any good documentation on how to do that? I couldn't find any.



Note: I will worry about other stuff like DB later. Right now, my headache is LDAP.







linux ldap migration






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 14 '15 at 11:30









vianna77

1085




1085












  • Here is similar with a good answer stackoverflow.com/questions/792563/…
    – StefanR
    Dec 14 '15 at 11:43


















  • Here is similar with a good answer stackoverflow.com/questions/792563/…
    – StefanR
    Dec 14 '15 at 11:43
















Here is similar with a good answer stackoverflow.com/questions/792563/…
– StefanR
Dec 14 '15 at 11:43




Here is similar with a good answer stackoverflow.com/questions/792563/…
– StefanR
Dec 14 '15 at 11:43










2 Answers
2






active

oldest

votes

















up vote
0
down vote













There is standard LDAP migration procedure provided by the vendors of LDAP check for details/documentation from respective vendor's support or user forums or you could also try perl scripts/tools available for migration (caution: try the scripts on test server and apply on production servers)



Below link should help you to some extent



http://www.tldp.org/HOWTO/LDAP-HOWTO/ldapmigrationtools.html






share|improve this answer




























    up vote
    0
    down vote













    I recently had the same problem. This answer at serverfault.com worked for me. Basically, these are the steps:



    On the 'old' machine run the following commands to export the configuration and the data, respectively:



    # service slapd stop
    # slapcat -n 0 -l backup-ldap-config.ldif
    # slapcat -n 1 -l backup-ldap-database.ldif


    Install OpenLDAP on the new machine (no need to configure anything) and copy the two ldif backup files to it.



    On the new machine, stop the slapd service and move the existing LDAP configuration out of the way:



    # systemctl stop slapd
    # mv /etc/ldap/{slapd.d,slapd.d-backup-after-fresh-install}


    Create a new directory with the proper ownership and import the config part of the LDAP server:



    # mkdir /etc/ldap/slapd.d
    # chown openldap:openldap /etc/ldap/slapd.d
    # slapadd -n 0 -F /etc/ldap/slapd.d -l backup-ldap-config.ldif
    _#################### 100.00% eta none elapsed none fast!
    Closing DB...
    # chown -R openldap:openldap /etc/ldap/slapd.d


    Import the data part of the backup and set the correct ownership:



    # slapadd -n 1 -F /etc/ldap/slapd.d -l backup-ldap-database.ldif
    *#################### 100.00% eta none elapsed 02s spd 148.9 k/s
    Closing DB...
    # chown -R openldap:openldap /var/lib/ldap


    And start the LDAP server:



    # systemctl start slapd


    In my case, the old machine was running Ubuntu 12.04 and the new one runs Ubuntu 18.04.






    share|improve this answer





















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "106"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f249255%2fmigrate-ldap-from-one-machine-to-another%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      0
      down vote













      There is standard LDAP migration procedure provided by the vendors of LDAP check for details/documentation from respective vendor's support or user forums or you could also try perl scripts/tools available for migration (caution: try the scripts on test server and apply on production servers)



      Below link should help you to some extent



      http://www.tldp.org/HOWTO/LDAP-HOWTO/ldapmigrationtools.html






      share|improve this answer

























        up vote
        0
        down vote













        There is standard LDAP migration procedure provided by the vendors of LDAP check for details/documentation from respective vendor's support or user forums or you could also try perl scripts/tools available for migration (caution: try the scripts on test server and apply on production servers)



        Below link should help you to some extent



        http://www.tldp.org/HOWTO/LDAP-HOWTO/ldapmigrationtools.html






        share|improve this answer























          up vote
          0
          down vote










          up vote
          0
          down vote









          There is standard LDAP migration procedure provided by the vendors of LDAP check for details/documentation from respective vendor's support or user forums or you could also try perl scripts/tools available for migration (caution: try the scripts on test server and apply on production servers)



          Below link should help you to some extent



          http://www.tldp.org/HOWTO/LDAP-HOWTO/ldapmigrationtools.html






          share|improve this answer












          There is standard LDAP migration procedure provided by the vendors of LDAP check for details/documentation from respective vendor's support or user forums or you could also try perl scripts/tools available for migration (caution: try the scripts on test server and apply on production servers)



          Below link should help you to some extent



          http://www.tldp.org/HOWTO/LDAP-HOWTO/ldapmigrationtools.html







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 17 '15 at 16:28









          snoopy

          817




          817
























              up vote
              0
              down vote













              I recently had the same problem. This answer at serverfault.com worked for me. Basically, these are the steps:



              On the 'old' machine run the following commands to export the configuration and the data, respectively:



              # service slapd stop
              # slapcat -n 0 -l backup-ldap-config.ldif
              # slapcat -n 1 -l backup-ldap-database.ldif


              Install OpenLDAP on the new machine (no need to configure anything) and copy the two ldif backup files to it.



              On the new machine, stop the slapd service and move the existing LDAP configuration out of the way:



              # systemctl stop slapd
              # mv /etc/ldap/{slapd.d,slapd.d-backup-after-fresh-install}


              Create a new directory with the proper ownership and import the config part of the LDAP server:



              # mkdir /etc/ldap/slapd.d
              # chown openldap:openldap /etc/ldap/slapd.d
              # slapadd -n 0 -F /etc/ldap/slapd.d -l backup-ldap-config.ldif
              _#################### 100.00% eta none elapsed none fast!
              Closing DB...
              # chown -R openldap:openldap /etc/ldap/slapd.d


              Import the data part of the backup and set the correct ownership:



              # slapadd -n 1 -F /etc/ldap/slapd.d -l backup-ldap-database.ldif
              *#################### 100.00% eta none elapsed 02s spd 148.9 k/s
              Closing DB...
              # chown -R openldap:openldap /var/lib/ldap


              And start the LDAP server:



              # systemctl start slapd


              In my case, the old machine was running Ubuntu 12.04 and the new one runs Ubuntu 18.04.






              share|improve this answer

























                up vote
                0
                down vote













                I recently had the same problem. This answer at serverfault.com worked for me. Basically, these are the steps:



                On the 'old' machine run the following commands to export the configuration and the data, respectively:



                # service slapd stop
                # slapcat -n 0 -l backup-ldap-config.ldif
                # slapcat -n 1 -l backup-ldap-database.ldif


                Install OpenLDAP on the new machine (no need to configure anything) and copy the two ldif backup files to it.



                On the new machine, stop the slapd service and move the existing LDAP configuration out of the way:



                # systemctl stop slapd
                # mv /etc/ldap/{slapd.d,slapd.d-backup-after-fresh-install}


                Create a new directory with the proper ownership and import the config part of the LDAP server:



                # mkdir /etc/ldap/slapd.d
                # chown openldap:openldap /etc/ldap/slapd.d
                # slapadd -n 0 -F /etc/ldap/slapd.d -l backup-ldap-config.ldif
                _#################### 100.00% eta none elapsed none fast!
                Closing DB...
                # chown -R openldap:openldap /etc/ldap/slapd.d


                Import the data part of the backup and set the correct ownership:



                # slapadd -n 1 -F /etc/ldap/slapd.d -l backup-ldap-database.ldif
                *#################### 100.00% eta none elapsed 02s spd 148.9 k/s
                Closing DB...
                # chown -R openldap:openldap /var/lib/ldap


                And start the LDAP server:



                # systemctl start slapd


                In my case, the old machine was running Ubuntu 12.04 and the new one runs Ubuntu 18.04.






                share|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  I recently had the same problem. This answer at serverfault.com worked for me. Basically, these are the steps:



                  On the 'old' machine run the following commands to export the configuration and the data, respectively:



                  # service slapd stop
                  # slapcat -n 0 -l backup-ldap-config.ldif
                  # slapcat -n 1 -l backup-ldap-database.ldif


                  Install OpenLDAP on the new machine (no need to configure anything) and copy the two ldif backup files to it.



                  On the new machine, stop the slapd service and move the existing LDAP configuration out of the way:



                  # systemctl stop slapd
                  # mv /etc/ldap/{slapd.d,slapd.d-backup-after-fresh-install}


                  Create a new directory with the proper ownership and import the config part of the LDAP server:



                  # mkdir /etc/ldap/slapd.d
                  # chown openldap:openldap /etc/ldap/slapd.d
                  # slapadd -n 0 -F /etc/ldap/slapd.d -l backup-ldap-config.ldif
                  _#################### 100.00% eta none elapsed none fast!
                  Closing DB...
                  # chown -R openldap:openldap /etc/ldap/slapd.d


                  Import the data part of the backup and set the correct ownership:



                  # slapadd -n 1 -F /etc/ldap/slapd.d -l backup-ldap-database.ldif
                  *#################### 100.00% eta none elapsed 02s spd 148.9 k/s
                  Closing DB...
                  # chown -R openldap:openldap /var/lib/ldap


                  And start the LDAP server:



                  # systemctl start slapd


                  In my case, the old machine was running Ubuntu 12.04 and the new one runs Ubuntu 18.04.






                  share|improve this answer












                  I recently had the same problem. This answer at serverfault.com worked for me. Basically, these are the steps:



                  On the 'old' machine run the following commands to export the configuration and the data, respectively:



                  # service slapd stop
                  # slapcat -n 0 -l backup-ldap-config.ldif
                  # slapcat -n 1 -l backup-ldap-database.ldif


                  Install OpenLDAP on the new machine (no need to configure anything) and copy the two ldif backup files to it.



                  On the new machine, stop the slapd service and move the existing LDAP configuration out of the way:



                  # systemctl stop slapd
                  # mv /etc/ldap/{slapd.d,slapd.d-backup-after-fresh-install}


                  Create a new directory with the proper ownership and import the config part of the LDAP server:



                  # mkdir /etc/ldap/slapd.d
                  # chown openldap:openldap /etc/ldap/slapd.d
                  # slapadd -n 0 -F /etc/ldap/slapd.d -l backup-ldap-config.ldif
                  _#################### 100.00% eta none elapsed none fast!
                  Closing DB...
                  # chown -R openldap:openldap /etc/ldap/slapd.d


                  Import the data part of the backup and set the correct ownership:



                  # slapadd -n 1 -F /etc/ldap/slapd.d -l backup-ldap-database.ldif
                  *#################### 100.00% eta none elapsed 02s spd 148.9 k/s
                  Closing DB...
                  # chown -R openldap:openldap /var/lib/ldap


                  And start the LDAP server:



                  # systemctl start slapd


                  In my case, the old machine was running Ubuntu 12.04 and the new one runs Ubuntu 18.04.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered yesterday









                  ph0t0nix

                  518417




                  518417






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f249255%2fmigrate-ldap-from-one-machine-to-another%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Accessing regular linux commands in Huawei's Dopra Linux

                      Can't connect RFCOMM socket: Host is down

                      Kernel panic - not syncing: Fatal Exception in Interrupt