ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Leonid Krivoshein <klark.devel@gmail.com>
To: glebus@asd.iao.ru,
	ALT Linux Sisyphus discussions <sisyphus@lists.altlinux.org>
Subject: Re: [sisyphus] Новый openldap-2.4.45-alt3
Date: Fri, 29 Dec 2017 00:07:40 +0300
Message-ID: <6ec37496-62bf-a9df-8c2c-8f2db2e5d032@gmail.com> (raw)
In-Reply-To: <2616344.E1CA1lstKD@gleb.lls.net.iao.ru>


28.12.2017 10:55, Gleb Kulikov пишет:
> В письме от 2017 December 27  (02:22:12) тов. Leonid Krivoshein написал:
>> ПЕРВОЕ: переход на более быстрый и более эффективный бэкэнд (L)MDB
> А как с миграцией работающей базы?

Поскольку конфиги при обновлении пакета не перезаписываются, раз они уже 
имеются в системе, автоматической миграции не будет, значит 
пользователей BDB/HDB обновление пакета не затрагивает. Если же хочется 
вручную мигрировать на MDB, это можно сделать так: с работающей базы 
снять полную резервную копию:

# slapcat > directory.ldif

Затем остановить сервер и внести изменения в конфиги, как описано в 
руководстве. Первый запуск сервера создаст чистую базу MDB. Теперь можно 
выполнить восстановление всей базы:

# grep -vE '^(structuralObjectClass|entryUUID|creatorsName|createTimestamp|entryCSN|modifiersName|modifyTimestamp): ' direcory.ldif \
         | ldapadd -x -D 'cn=ldaproot,dc=zags,dc=loc' -w 'MySecretPassword'


Такой вариант "ручной" миграции с Альт-Доменом я проверял -- всё 
работало. Интересно, получится ли у вас. И хорошо бы понять, есть ли 
смысл предусмотреть механизм автоматической миграции на MDB при 
обновлении пакета (сильно в этом сомневаюсь).

В штатном slapd.conf есть такие строки:

moduleload     back_hdb.la

# First database definition
include /etc/openldap/slapd-hdb-db01.conf

# Second database definition
include /etc/openldap/slapd-hdb-db02.conf


При переходе на MDB они становятся ненужными, их можно закомментировать, 
а в качестве базы прописать свой конфиг MDB, например, как в новом 
пакете: 
http://git.altlinux.org/gears/o/openldap.git?p=openldap.git;a=blob;f=openldap-slapd-mdb-db01.conf;h=b8752c0674c3087fa2db4005c7ff648baf2aab35;hb=b7c54e53ac033c20465eca670155921312f560b8

Это связано с тем, что бэкэнд MDB уже встроен, подгружать для него 
модуль не требуется. При ручной миграции лучше сохранить и конфиг старой 
базы, и директоррию, а новую MDB базу создать в отдельной директории. 
Это позволит вернуться обратно на HDB, если что-то пойдёт не так.


-- 
Best regards,
Leonid Krivoshein.



      reply	other threads:[~2017-12-28 21:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-26 23:22 Leonid Krivoshein
2017-12-28  7:55 ` Gleb Kulikov
2017-12-28 21:07   ` Leonid Krivoshein [this message]

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=6ec37496-62bf-a9df-8c2c-8f2db2e5d032@gmail.com \
    --to=klark.devel@gmail.com \
    --cc=glebus@asd.iao.ru \
    --cc=sisyphus@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 Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/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 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

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


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