Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ypxfr(1M) — HP-UX 6.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

crontab(1)

domainname(1)

cron(1M)

ypinit(1M)

yppush(1M)

ypserv(1M)

ypfiles(4)

YPXFR(1M)  —  Series 300 Only

NAME

ypxfr, ypxfr_1perday, ypxfr_1perhour, ypxfr_2perday -
     transfer a Yellow Pages database from a Yellow Pages
     server to the local node

SYNOPSIS

/usr/etc/yp/ypxfr [ -h host ] [ -f ] [ -d domain ] \
          [ -c ] [ -C tid prog ipaddr port ] mapname

DESCRIPTION

The ypxfr command copies a Yellow Pages (YP) map (database) to the local host from a YP server by using the YP services.  A map may be copied regardless of its age, or it may be copied depending on whether its modification time (order number) is more recent than that of the local map. 

The ypxfr command creates a temporary map in the directory /usr/etc/yp/domain; domain is the YP domain. The ypxfr command fills the map with mapname entries, obtains the map parameters (master and order number), and loads them.  It then clears the old version of mapname and moves the temporary map to the existing mapname.

If ypxfr is run interactively, it writes messages to the standard output.  If ypxfr is invoked without a controlling terminal and if the log file /usr/etc/yp/ypxfr.log exists, ypxfr appends all its messages to that file.  Since ypxfr is usually run from root’s crontab(1) file or by yppush(1M), the log file can retain a record of what ypxfr attempted and what the results were. 

To maintain consistency between YP servers, ypxfr should be executed periodically for every map in the YP.  Different maps change at different rates.  The services.byname map may not change for months at a time, for instance, and may therefore be checked for changes only once a day in the early morning hours.  However, passwd.byname may change several times per day, so hourly checks for updates may be appropriate. 

A crontab(1) file can perform these periodic checks and transfers automatically. Rather than having a separate crontab(1) file for each map, ypxfr requests can be grouped in a shell script to update several maps at once.  Example scripts (mnemonically named) are in /usr/etc/yp: ypxfr_1perday, ypxfr_2perday, and ypxfr_1perhour. They serve as reasonable first drafts that can be changed if needed.

Refer to ypfiles(4) and ypserv(1M) for an overview of the YP.

Options

−h host
Obtain the map from host, regardless of its master server.  If this option is not used, ypxfr asks the YP service for the master’s host name and tries to obtain its map.  The host may be a name or an IP address of the form a.b.c.d.

−fForce the map to be copied even if its order number at the remote YP server is not more recent than the order number of the local map. 

−d domain
Copy the map from a YP server in domain rather than the domain returned by domainname(1).

−cDo not send a "clear current map" request to the local ypserv(1M) process.  Use this flag if ypserv(1M) is not running locally when you are running ypxfr. Otherwise, ypxfr complains that it cannot talk to the local ypserv(1M), and the transfer fails. If ypserv(1M) is running locally, do not use this flag.

−C tid prog ipaddr port
This option is used by ypserv(1M) only.  When ypserv(1M) invokes ypxfr, it specifies that ypxfr should call back a yppush(1M) process (that initiated the transfer) at the host with IP address ipaddr, registered as program number prog, listening on port port, and waiting for a response to transaction tid.

AUTHOR

Sun Microsystems, Inc. 

FILES

/usr/etc/yp/ypxfr.log log file

The following scripts are suggested for use with cron(1M). 

/usr/etc/yp/ypxfr_1perday run one transfer per day

/usr/etc/yp/ypxfr_2perday run two transfers per day

/usr/etc/yp/ypxfr_1perhour hourly transfers of "volatile" maps

SEE ALSO

crontab(1), domainname(1), cron(1M), ypinit(1M), yppush(1M), ypserv(1M), ypfiles(4). 

INTERNATIONAL SUPPORT

8-bit data, messages

Hewlett-Packard Company  —  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026