39.3.3. Obnovení repliky.

Obnovení stavu slave z master serveru

Postup

Vytvořil jsem si malý skript, který toto automatizuje

Příklad 39.1. Skript pro obnovení slave LDAP serveru

#!/bin/sh
# $Header: /home/radek/cvs/unix-book/input/unix/ch-ldap.xml,v 1.1.1.1 2009-01-24 15:42:51 radek Exp $
# Obnoveni stavu ldap repliky.  Nasilna cesta.
# Copyright (C) 2001 Radek Hnilica
# All rights reserved.

SLAVE=ldap-slave-pha

/etc/init.d/openldapd stop
tar cf - /var/lib/openldap|gzip -9| ssh $SLAVE "
    /etc/init.d/openldapd stop
    cd /
    tar xzf -
    /etc/init.d/openldapd start
    "
/etc/init.d/openldapd start