Home Explore Blog CI



postgresql

13th chunk of `doc/src/sgml/ref/pg_basebackup.sgml`
dde36678ad8eca1bd901e6b1a56d384783efad811fcc47eb0000000100000fbf
    </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-h <replaceable class="parameter">host</replaceable></option></term>
      <term><option>--host=<replaceable class="parameter">host</replaceable></option></term>
      <listitem>
       <para>
        Specifies the host name of the machine on which the server is
        running.  If the value begins with a slash, it is used as the
        directory for a Unix domain socket. The default is taken
        from the <envar>PGHOST</envar> environment variable, if set,
        else a Unix domain socket connection is attempted.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-p <replaceable class="parameter">port</replaceable></option></term>
      <term><option>--port=<replaceable class="parameter">port</replaceable></option></term>
      <listitem>
       <para>
        Specifies the TCP port or local Unix domain socket file
        extension on which the server is listening for connections.
        Defaults to the <envar>PGPORT</envar> environment variable, if
        set, or a compiled-in default.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-s <replaceable class="parameter">interval</replaceable></option></term>
      <term><option>--status-interval=<replaceable class="parameter">interval</replaceable></option></term>
      <listitem>
       <para>
        Specifies the number of seconds between status packets sent back to
        the source server. Smaller values allow more accurate monitoring of
        backup progress from the server.
        A value of zero disables periodic status updates completely,
        although an update will still be sent when requested by the server, to
        avoid timeout-based disconnects. The default value is 10 seconds.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-U <replaceable>username</replaceable></option></term>
      <term><option>--username=<replaceable class="parameter">username</replaceable></option></term>
      <listitem>
       <para>
        Specifies the user name to connect as.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-w</option></term>
      <term><option>--no-password</option></term>
      <listitem>
       <para>
        Prevents issuing a password prompt.  If the server requires
        password authentication and a password is not available by
        other means such as a <filename>.pgpass</filename> file, the
        connection attempt will fail.  This option can be useful in
        batch jobs and scripts where no user is present to enter a
        password.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-W</option></term>
      <term><option>--password</option></term>
      <listitem>
       <para>
        Forces <application>pg_basebackup</application> to prompt for a
        password before connecting to the source server.
       </para>

       <para>
        This option is never essential, since
        <application>pg_basebackup</application> will automatically prompt
        for a password if the server demands password authentication.
        However, <application>pg_basebackup</application> will waste a
        connection attempt finding out that the server wants a password.
        In some cases it is worth typing <option>-W</option> to avoid the extra
        connection attempt.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </para>

   <para>
    Other options are also available:

    <variablelist>
     <varlistentry>
       <term><option>-V</option></term>
       <term><option>--version</option></term>
       <listitem>
       <para>
       Prints the <application>pg_basebackup</application> version and exits.
       </para>
       </listitem>
     </varlistentry>

     <varlistentry>
       <term><option>-?</option></term>

Title: pg_basebackup: Connection, Status, and Authentication Options
Summary
This section continues detailing `pg_basebackup` options, focusing on connection parameters like hostname and port, status update intervals, username specification, and password handling. It explains how to suppress or force password prompts and how to specify the frequency of status packets sent to the server. Additionally, it includes the option to display the pg_basebackup version.