ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
From: "Вадим Илларионов" <master@usib.irkps.ru>
To: sysadmins@lists.altlinux.org
Subject: Re: [Sysadmins] current openldap for production
Date: Fri, 16 Mar 2007 09:06:39 +0800
Message-ID: <etcrin$jig$2@sea.gmane.org> (raw)
In-Reply-To: <20070315112607.7d022ed7@shadow.orionagro.com.ua>

От Dmitriy L. Kruglikov поступило следующее:

> Для онлайн бэкапа подходит hdb.
> И резервные копии создаются примерно так:
> 
> /usr/sbin/slapcat > /etc/openldap/backup/backup.ldif

А у меня так: 

# cat /etc/cron.daily/ldap_backup
#!/bin/sh
BASES=/var/lib/ldap/bases
/usr/sbin/slapcat | bzip2 -c9 > "$BASES/`date +%Y.%m.%d,%H:%M`.ldif.bz2"

Ну, а восстановление после сбоев сделано так:

# cat /var/lib/ldap/bases/ldap_restore
#!/bin/sh
BASE="./US.Post"
#LAST=`ls | grep .bz2  | sort | tail -n2 | head -n1` # ПРЕДпоследний бэкап
LAST=`ls | grep .bz2  | sort | tail -n1`             # Последний бэкап

/etc/init.d/slapd condstop
rm -f $BASE/*
/etc/init.d/slapd start
/etc/init.d/slapd stop
bzip2 -cd "$LAST" | /usr/sbin/slapadd
chown -R ldap.ldap $BASE
/etc/init.d/slapd start

________________________
С уважением,
Вадим Илларионов
системный администратор
Усолье-Сибирский почтамт
JID: см. <mailto:>
UIN: 7899517
Телефоны:
Мобильный +7 904 658-4154
Рабочий   +7 39543 444-00



  reply	other threads:[~2007-03-16  1:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-14 20:07 Eugene Prokopiev
2007-03-14 20:17 ` Eugene Prokopiev
2007-03-15  0:16 ` Dmitry Lebkov
2007-03-15  9:11   ` Eugene Prokopiev
2007-03-15  9:26     ` Dmitriy L. Kruglikov
2007-03-16  1:06       ` Вадим Илларионов [this message]
2007-03-15 12:39     ` Dmitry Lebkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='etcrin$jig$2@sea.gmane.org' \
    --to=master@usib.irkps.ru \
    --cc=sysadmins@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git