diff options
Diffstat (limited to 'ypxfr/ypxfr.8.xml')
-rw-r--r-- | ypxfr/ypxfr.8.xml | 225 |
1 files changed, 225 insertions, 0 deletions
diff --git a/ypxfr/ypxfr.8.xml b/ypxfr/ypxfr.8.xml new file mode 100644 index 0000000..8ef3de4 --- /dev/null +++ b/ypxfr/ypxfr.8.xml @@ -0,0 +1,225 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" + "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> + +<refentry id='ypxfr'> + + <refmeta> + <refentrytitle>ypxfr</refentrytitle> + <manvolnum>8</manvolnum> + <refmiscinfo class='setdesc'>NIS Reference Manual</refmiscinfo> + </refmeta> + + <refnamediv id='name'> + <refname>ypxfr</refname> + <refpurpose>transfer NIS database from remote server to local host</refpurpose> + </refnamediv> + +<refsynopsisdiv id='synopsis'> +<cmdsynopsis> + <command>/usr/lib/yp/ypxfr</command> + <arg choice='opt'>-f</arg> + <arg choice='opt'>-c</arg> + <arg choice='opt'>-d <replaceable>target</replaceable> <replaceable>domain</replaceable></arg> + <arg choice='opt'>-h <replaceable>source</replaceable> <replaceable>host</replaceable></arg> + <arg choice='opt'>-s <replaceable>source</replaceable> <replaceable>domain</replaceable></arg> + <arg choice='opt'>-C <replaceable>taskid</replaceable> <replaceable>program-number</replaceable> <replaceable>host</replaceable> <replaceable>port</replaceable></arg> + <arg choice='opt'>-p <replaceable>yp_path</replaceable></arg> + <arg choice='plain' rep='repeat'><replaceable>mapname</replaceable></arg> + + <sbr/> +</cmdsynopsis> +</refsynopsisdiv> + + +<refsect1 id='description'><title>DESCRIPTION</title> +<para><emphasis remap='B'>ypxfr</emphasis> +copies an NIS database from one NIS server to the local host by +using the NIS service. +<emphasis remap='B'>ypxfr</emphasis> +is generally invoked by +<emphasis remap='B'>ypinit</emphasis> +or by +<emphasis remap='B'>ypserv,</emphasis> +when +<emphasis remap='B'>ypserv</emphasis> +receives a map transfer request from +<emphasis remap='B'>yppush.</emphasis> +It creates a temporary map in the directory +<filename>/var/yp/domain</filename> +(this directory must already exist; +<emphasis remap='I'>domain</emphasis> +is the default domainname for the local host), fills it by getting +the map's entries and fetches the map parameters (master and order number). +If the transfer was successful, the old version of the map will be +deleted and the temporary copy will be moved into its place. +Then, +<emphasis remap='B'>ypxfr</emphasis> +will attempt to send a "clear current map" request to the local +<emphasis remap='B'>ypserv.</emphasis></para> + +<para>If run interactively, +<emphasis remap='B'>ypxfr</emphasis> +writes its output to stderr. +However, if it is invoked without a controlling terminal, it will +log the output to syslog.</para> + +<para><emphasis remap='B'>ypxfr</emphasis> +is used primarily in environments where several NIS servers are in use. +For all maps, you have a NIS master server, which maintains a canonical +copy of the NIS map, and all the other servers, the NIS slaves, copy +the new version of the map from the master whenever a update was made. +Normally, you have one NIS master for all maps.</para> + +<para>In order to maintain consistency across all NIS servers, +<emphasis remap='B'>ypxfr</emphasis> +can be run periodically in a +<emphasis remap='B'>cron</emphasis> +job. Maps which change infrequently need only be updated once a day +(preferably late at night when system usage is lowest), where those +with frequent changes (such as +<emphasis remap='I'>passwd.byname</emphasis> +and +<emphasis remap='I'>passwd.byuid )</emphasis> +should be updated perhaps once every hour. +Examples are in +<filename>/usr/lib/yp: ypxfr_1perday, ypxfr_2perday,</filename> +and +<emphasis remap='B'>ypxfr_1perhour.</emphasis> +They can serve as reasonable first cuts.</para> + +<para>Normally all updates should be propagated by +<emphasis remap='B'>yppush</emphasis> +when +<filename>/var/yp/Makefile</filename> +is run on the NIS master server, however it is a good practice +on large networks where possible outages could cause NIS slaves to +fall out of sync with the master.</para> + + +</refsect1> + +<refsect1 id='options'><title>OPTIONS</title> +<para>The following options are supported:</para> +<variablelist remap='TP'> + <varlistentry> + <term><option>-f</option></term> + <listitem> +<para>Force a map transfer. Normally, +<emphasis remap='B'>ypxfr</emphasis> +will not transfer a map if it determines that the NIS master's copy +is not newer than the existing copy already on the local host. This +flag forces a transfer regardless of which server's version is more +recent.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>-c</option></term> + <listitem> +<para>Do not send a "clear current map" request to the +<emphasis remap='B'>ypserv</emphasis> +process running on the local host. This flag is normally used when +invoking +<emphasis remap='B'>ypxfr</emphasis> +by +<emphasis remap='B'>ypinit</emphasis> +or if +<emphasis remap='B'>ypserv</emphasis> +is not running locally at the time you are running +<emphasis remap='B'>ypxfr.</emphasis> +Otherwise, +<emphasis remap='B'>ypxfr</emphasis> +will complain that it cannot talk to the local +<emphasis remap='B'>ypserv,</emphasis> +and the transfer will fail.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>-d</option><replaceable> domain</replaceable></term> + <listitem> +<para>Specify a domain other than the default NIS domain.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>-h</option><replaceable> source host</replaceable></term> + <listitem> +<para>Get the map from +<emphasis remap='I'>host</emphasis>, +regardless of what the map says the master is. If +<emphasis remap='I'>host</emphasis> +is not specified, +<emphasis remap='B'>ypxfr</emphasis> +asks the +<acronym>NIS</acronym> +service for the name of the master, and tries to get the +map from there. This option is used to insure that ypxfr only copies +maps from the NIS master server.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>-s</option><replaceable> source domain</replaceable></term> + <listitem> +<para>Specify a source domain from which to transfer a map that should be the same +across domains.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>-C</option><replaceable> taskid progam-number host port</replaceable></term> + <listitem> +<para>This option is +<emphasis remap='B'>only</emphasis> +for use by +<emphasis remap='B'>ypserv .</emphasis> +When +<emphasis remap='B'>ypserv</emphasis> +invokes +<emphasis remap='B'>ypxfr</emphasis>, +it specifies that +<emphasis remap='B'>ypxfr</emphasis> +should call back a +<emphasis remap='B'>yppush</emphasis> +process at the host with +<acronym>IP</acronym> +address or name +<emphasis remap='I'>host</emphasis>, +registered as program number +<emphasis remap='I'>progam-number</emphasis>, +listening on port +<emphasis remap='I'>port</emphasis>, +and waiting for a response to transaction +<emphasis remap='I'>taskid</emphasis>.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>-p</option><replaceable> yp_path</replaceable></term> + <listitem> +<para>Change the directory for the maps to +<emphasis remap='I'>yp_path/[domainname]/</emphasis>, the default +is <filename>/var/yp/[domainname]</filename>.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis remap='I'>mapname</emphasis></term> + <listitem> +<para>One or more names of the map to transfer.</para> + </listitem> + </varlistentry> +</variablelist> +</refsect1> + +<refsect1 id='files'><title>FILES</title> +<para>/var/yp/[domainname]/[maps]</para> +</refsect1> + +<refsect1 id='see_also'><title>SEE ALSO</title> +<para><citerefentry><refentrytitle>ypserv</refentrytitle><manvolnum>8</manvolnum></citerefentry>, +<citerefentry><refentrytitle>yppush</refentrytitle><manvolnum>8</manvolnum></citerefentry>, +<citerefentry><refentrytitle>ypinit</refentrytitle><manvolnum>8</manvolnum></citerefentry>, +<citerefentry><refentrytitle>cron</refentrytitle><manvolnum>8</manvolnum></citerefentry>, +<citerefentry><refentrytitle>crontab</refentrytitle><manvolnum>5</manvolnum></citerefentry></para> +</refsect1> + +<refsect1 id='author'><title>AUTHOR</title> +<para>Thorsten Kukuk <kukuk@linux-nis.org></para> +</refsect1> +</refentry> |