• [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
  • 相关阅读:
    leetcode刷题-131~
    leetcode刷题-106~114/116~122/125/127/129~130
    leetcode刷题-100~105
    Intel-Pin的windows安装
    九、appium自动化框架综合实践
    QQ传文件用例设计
    mysql常用语句
    谐云试用的日子
    码农开发资料集
    MyBatis中一个SQL语句的执行过程解析
  • 原文地址:https://www.cnblogs.com/silenceli/p/4048219.html
Copyright © 2020-2023  润新知