Operating System - HP-UX
1853330 Members
8253 Online
104086 Solutions
New Discussion

Re: NIS Disaster Recovery

 
Andreas Broecking
New Member

NIS Disaster Recovery

Hi all,

I have a NIS domain with a master server and a slave server on every hpux-11 cluster . The concept includes netgroups to seperate every package. Now my master server died and due to special circumstances I don't have a working backup =(
The user authentication works well over the slaveservers but I need to rebuild the master from scratch.

Is there any possibility to extract or regenerate the original /var/yp/src files from one of the "compiled" databases on the slaveservers ?
Or do I really have to `ypcat` the passwd/group/services from every server and rebuild everything (including netgroups for a few hundred packages =( )
from scratch ?!

Help really appreciated.

Thanks in advance,
Andreas
7 REPLIES 7
T G Manikandan
Honored Contributor

Re: NIS Disaster Recovery

S.K.Chan(pharoah) has some wonderful answers here

http://bizforums.itrc.hp.com/cm/QuestionAnswer/0,,0x24264b3ef09fd611abdb0090277a778c,00.html

S.K.Chan scored 100 points for the responses ..very rare!
Andreas Broecking
New Member

Re: NIS Disaster Recovery

Hi,

thanks for the link. Don't know why I didn't see it in my research.

But the answers of S.K. Chan assumed that one has a backup of the last master mapfiles. But I don't have the ascii source files anymore. That's why I asked if it's possible to recreate them from a /var/yp/ on a slaveserver.

Thanks in advance and kind regards,

Andreas
Robert-Jan Goossens
Honored Contributor

Re: NIS Disaster Recovery

Hi,

Just a question. Have you got a recent bootable tape (ignite) ?

Robert-Jan.
Andreas Broecking
New Member

Re: NIS Disaster Recovery

Hi Robert-Jan,

no, an unexpirienced collegue screwed up the backup.

I don't have anything but regarding NIS but /var/yp/ on the slave servers.

Andreas
Robert-Jan Goossens
Honored Contributor

Re: NIS Disaster Recovery

Hi Andreas,

Oke found something on SUN solve

-Quote-

This document describes how to recover ascii files such as passwd and shadow from NIS maps on a slave server.

The following procedure helps when the NIS master server's disk crashes and you don't have backup of maps. If you have slave server running, then you can get ascii files from slave server as below :

On Slave, perform the following to get passwd and shadow ascii files:

NOTE: pwconv only works in the /etc directory!

1. On the NIS slave server, back up your current /etc/passwd and /etc/shadow files to /etc/p

asswd.sav and /etc/shadow.sav.

2. # ypcat passwd > /tmp/passwd.ypcat

3. Paste the user entries from /tmp/passwd.ypcat to the bottom of the /etc/passwd file.

4. # pwconv

5. Move /etc/passwd and /etc/shadow to /etc/nis (or another source directory where you want to collect your NIS ascii files)

6. Edit the /etc/nis/passwd and /etc/nis/shadow files and remove local information like root, sys, bin, lp, and other things that should not be in the NIS passwd map.

7. Move /etc/passwd.sav and /etc/shadow.sav to /etc/passwd and /etc/shadow on slave server.

Now you have source files for NIS in /etc/nis for passwd and shadow and the original /etc/passwd and /etc/shadow is restored.


-Endquote-

Hope it helps,

Robert-Jan.


Steve Labar
Valued Contributor

Re: NIS Disaster Recovery

Similar to Robert-Jan's suggestions, I would ypcat all existing maps to files and make appropriate changes on your NIS master. You can also do
ypcat netgroup
ypcat protocols
ypcat group
and any other NIS maps you may need.

Good Luck.

Steve
Steve Labar
Valued Contributor

Re: NIS Disaster Recovery

Similar to Robert-Jan's suggestions, I would ypcat all existing maps to files and make appropriate changes on your NIS master. You can also do
ypcat netgroup > /tmp/netgrou
ypcat protocols > /tmp/protocols
ypcat group > /tmp/group
and any other NIS maps you may need.

Good Luck.

Steve