zoukankan      html  css  js  c++  java
  • [ldap]slapcat/ldapsearch与ldap备份

    http://serverfault.com/questions/577356/ldap-backup-with-slapcat-vs-ldapsearch

    Used: openldap-servers-2.4.23-34.el6_5.1.x86_64

    Task: create script for crontab to create scheduled database full backup.

    1) slapcat - create file in in the default format, Berkeley DB.

    2) slapcat can be done while slapd running (if bdb/hdb database used).

    3) To restore file after slapcat - must be used slapdd (not ldapadd).

    4) slapcat/add doesn't require password.

    5) slapadd can be done only when slapd stopped.

    Example:

     $ slapcat -f /etc/openldap/slapd.conf -b "dc=db_1" -l db_1_backup.ldif
     $ slapadd -l db_1_backup.ldif
    

    Instead of slapcat/add - let's took a look at ldapsearch/add:

    1) ldapsearch - creates file with almost same information as slapcat;

    2) ldapadd - can use file from ldapsearch, don't require slapd must be stopped;

    3) ldapadd/search - require password.

    Example:

     $ ldapsearch -D "cn=root,dc=db_1" -W -b "dc=db_1" "dc=db_1" -LLL > db_1_backup2.ldif
     $ ldapadd -x -D "cn=root,dc=db_1" -W -f db_1_backup2.ldif
  • 相关阅读:
    势函数的构造
    10.29模拟赛总结
    10.29vp总结
    10.25模拟赛总结
    10.24模拟赛总结
    线段树练习
    一键挖矿
    P1972 [SDOI2009]HH的项链
    P3901 数列找不同
    P5546 [POI2000]公共串
  • 原文地址:https://www.cnblogs.com/silenceli/p/4048219.html
Copyright © 2011-2022 走看看