ypxfr(1M) ypxfr(1M)
NAME
ypxfr - transfer a NIS file to the local host
SYNOPSIS
/usr/sbin/ypxfr [-c] [-f] [-d ypdomain] [-h host] [-s ypdomain]
[-C tid prog server] mapname
DESCRIPTION
The system administrator of a slave can use this command to transfer a
specified NIS file from the master to this slave.
Transferring modified NIS files from the master to the slaves ensures
that the data on the NIS servers is up-to-date and consistent.
This command is used, for example, if the slave was temporarily not
connected to the network. In this case, it can no longer be guaranteed
that the latest version of the NIS files are on the slave.
The ypxfr command should be executed regularly for each NIS file. A
crontab entry can be used to perform periodic updates automatically.
Remember that the various NIS files change at different rates.
For example, the NIS file services.byname may not change for months at
a time. Therefore it is sufficient to transfer it to the slaves once a
month. The NIS file mail.aliases or hosts.byname may change several
times a day. They should therefore be transferred several times a day
using the ypxfr command.
Instead of creating a crontab entry for each NIS file, you can group
commands together. This can be done using a shell script. For example:
/usr/sbin/ypxfr1day transfer once a day
/usr/sbin/ypxfr2day transfer twice a day
/usr/sbin/ypxfr1hour transfer once an hour
These entries are automatically generated on Reliant UNIX computers if
the slaves are administered using the menu system. In addition, all
NIS files are fetched again each time the system is started up.
This command must be issued at the host to which the NIS files are to
be transferred from the master.
The command needs the directory /var/yp/domain on the local host for
storing the NIS files (domain is the name of the domain the host
belongs to).
When transferring the file, the command generates a temporary NIS file
in the directory /var/yp/domain on the local host.
Page 1 Reliant UNIX 5.44 Printed 11/98
ypxfr(1M) ypxfr(1M)
The temporary NIS file is filled with entries from the NIS file to be
transferred. The file's parameters such as the name of the master and
the version number are fetched and loaded.
The command subsequently deletes any old versions of the NIS file and
transfers the temporary NIS file to the real file name.
If the ypxfr command is used interactively, it writes its output to
standard output. The command can also be executed in a command file
such as crontab, or by a program such as ypserv. In this case, the
messages are written to the file /var/yp/ypxfr.log if it exists. You
can use this file later to see what was attempted and what the results
were.
OPTIONS
-c must be specified if you are running ypxfr and the ypserv daemon
is not active locally.
If the ypserv daemon is not running locally when you start ypxfr
and this argument was omitted, a message is issued to standard
output that the local ypserv daemon could not be reached.
-f forces the transfer to take place even if the version on the mas-
ter is not more recent than the local version.
-h host
transfers the NIS file from the host with the name or Internet
address host. The host specified may be the master or a slave.
If host is omitted, the name of the master is passed on to the
ypxfr command by the Network Information Service. The command
then attempts to transfer the NIS file from there.
-d domain
may be specified if the NIS file is to be transferred from a
domain other than the default domain. domain is the name of the
other domain.
The default value is the name output when the domainname(1) com-
mand is issued.
-C tid prog server
is only used by the ypserv daemon.
If ypserv invokes ypxfr, this argument specifies that ypxfr
should call a yppush process at the host with the name server
which is registered as program number prog. The response to tran-
saction tid is then awaited by ypxfr.
mname
is the name of the NIS file to be transferred.
Page 2 Reliant UNIX 5.44 Printed 11/98
ypxfr(1M) ypxfr(1M)
EXAMPLE
The system administrator would like to transfer the NIS file
hosts.byaddr to the slave. The file is to be transferred even if the
version on the master is not more recent.
ypxfr -f hosts.byaddr
The argument -f forces the transfer.
FILES
/usr/yp/ypxfr.log
/usr/sbin/ypxfr1day
/usr/sbin/ypxfr2day
/usr/sbin/ypxfr1hour
/usr/spool/cron/crontabs/root
/etc/init.d/yp
/var/yp/ypdomain
SEE ALSO
crontab(1), yppush(1M), ypserv(1M), ypfiles(4).
Page 3 Reliant UNIX 5.44 Printed 11/98