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>
<term><option>--help</option></term>
<listitem>
<para>
Shows help about <application>pg_basebackup</application> command line
arguments, and exits.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1>
<title>Environment</title>
<para>
This utility, like most other <productname>PostgreSQL</productname> utilities,
uses the environment variables supported by <application>libpq</application>
(see <xref linkend="libpq-envars"/>).
</para>
<para>
The environment variable <envar>PG_COLOR</envar> specifies whether to use
color in diagnostic messages. Possible values are
<literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</para>
</refsect1>
<refsect1>
<title>Notes</title>
<para>
At the beginning of the backup, a checkpoint needs to be performed on the
source server. This can take some time (especially if the option
<literal>--checkpoint=fast</literal> is not used), during
which <application>pg_basebackup</application> will appear to be idle.
</para>
<para>
The backup will include all files in the data directory and tablespaces,
including the configuration files and any additional files placed in the
directory by third parties, except certain temporary files managed by
PostgreSQL and operating system files. But only regular files and
directories are copied, except that
symbolic links used for tablespaces are preserved. Symbolic links pointing
to certain directories known to PostgreSQL are copied as empty directories.
Other symbolic links and special device files are skipped.
See <xref linkend="protocol-replication"/> for the precise details.
</para>
<para>
In plain format, tablespaces will be backed up to the same path
they have on the source server, unless the
option <literal>--tablespace-mapping</literal> is used. Without
this option, running a plain format base backup on the same host as the
server will not work if tablespaces are in use,