zoukankan      html  css  js  c++  java
  • openldap备份与还原

    备份

    /usr/sbin/slapcat > ldapbackupfast$curday.ldif

    还原(还原之前需要关闭slapd服务)

    slapadd -l /data/ldapbackupfast.ldif

    还原使用的是openldap底层的Berkeley DB机制,需要修改dbconfig

    # $OpenLDAP: pkg/ldap/servers/slapd/DB_CONFIG,v 1.3.2.4 2007/12/18 11:53:27 ghenry Exp $
    # Example DB_CONFIG file for use with slapd(8) BDB/HDB databases.
    #
    # See the Oracle Berkeley DB documentation
    #   <http://www.oracle.com/technology/documentation/berkeley-db/db/ref/env/db_config.html>
    # for detail description of DB_CONFIG syntax and semantics.
    #
    # Hints can also be found in the OpenLDAP Software FAQ
    #    <http://www.openldap.org/faq/index.cgi?file=2>
    # in particular:
    #   <http://www.openldap.org/faq/index.cgi?file=1075>
    
    # Note: most DB_CONFIG settings will take effect only upon rebuilding
    # the DB environment.
    
    # one 0.25 GB cache
    set_cachesize 0 2147483648 1
    
    # Data Directory
    #set_data_dir db
    
    # Transaction Log settings
    set_lg_regionmax 268435456
    set_lg_bsize 2097152
    #set_lg_dir logs
    set_lk_max_locks 10000
    set_lk_max_lockers 10000
    set_lk_max_objects 20000
    
    
    #自动删除日志
    set_flags DB_LOG_AUTOREMOVE
    
    
    # Note: special DB_CONFIG flags are no longer needed for "quick"
    # slapadd(8) or slapindex(8) access (see their -q option). 
  • 相关阅读:
    多线程中变量的内存分配
    VS2019解决Cannot resolve symbol ' '问题
    排序算法——选择排序
    观察者模式
    c# 之linq——小白入门级
    c# 迭代器
    MySql学习
    rabbitmq安装及简单demo练习
    VMware Workstation 12 PRo密钥
    远程过程调用——RPC
  • 原文地址:https://www.cnblogs.com/stimlee/p/8057419.html
Copyright © 2011-2022 走看看