Home Explore Blog CI



postgresql

5th chunk of `doc/src/sgml/ref/pg_verifybackup.sgml`
fe00fe33d3c8e154e2b1033fe09b279764e6e3299478554f0000000100000d2c
 <listitem>
       <para>
        Don't print anything when a backup is successfully verified.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-s</option></term>
      <term><option>--skip-checksums</option></term>
      <listitem>
       <para>
        Do not verify data file checksums. The presence or absence of
        files and the sizes of those files will still be checked. This is
        much faster, because the files themselves do not need to be read.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-w <replaceable class="parameter">path</replaceable></option></term>
      <term><option>--wal-directory=<replaceable class="parameter">path</replaceable></option></term>
      <listitem>
       <para>
        Try to parse WAL files stored in the specified directory, rather than
        in <literal>pg_wal</literal>. This may be useful if the backup is
        stored in a separate location from the WAL archive.
       </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>
       Print the <application>pg_verifybackup</application> version and exit.
       </para>
       </listitem>
     </varlistentry>

     <varlistentry>
       <term><option>-?</option></term>
       <term><option>--help</option></term>
       <listitem>
       <para>
       Show help about <application>pg_verifybackup</application> command
       line arguments, and exit.
       </para>
       </listitem>
     </varlistentry>

    </variablelist>
   </para>

 </refsect1>

 <refsect1>
  <title>Examples</title>

  <para>
   To create a base backup of the server at <literal>mydbserver</literal> and
   verify the integrity of the backup:
<screen>
<prompt>$</prompt> <userinput>pg_basebackup -h mydbserver -D /usr/local/pgsql/data</userinput>
<prompt>$</prompt> <userinput>pg_verifybackup /usr/local/pgsql/data</userinput>
</screen>
  </para>

  <para>
   To create a base backup of the server at <literal>mydbserver</literal>, move
   the manifest somewhere outside the backup directory, and verify the
   backup:
<screen>
<prompt>$</prompt> <userinput>pg_basebackup -h mydbserver -D /usr/local/pgsql/backup1234</userinput>
<prompt>$</prompt> <userinput>mv /usr/local/pgsql/backup1234/backup_manifest /my/secure/location/backup_manifest.1234</userinput>
<prompt>$</prompt> <userinput>pg_verifybackup -m /my/secure/location/backup_manifest.1234 /usr/local/pgsql/backup1234</userinput>
</screen>
  </para>

  <para>
   To verify a backup while ignoring a file that was added manually to the
   backup directory, and also skipping checksum verification:
<screen>
<prompt>$</prompt> <userinput>pg_basebackup -h mydbserver -D /usr/local/pgsql/data</userinput>
<prompt>$</prompt> <userinput>edit /usr/local/pgsql/data/note.to.self</userinput>
<prompt>$</prompt> <userinput>pg_verifybackup --ignore=note.to.self --skip-checksums /usr/local/pgsql/data</userinput>
</screen></para>

 </refsect1>

 <refsect1>
  <title>See Also</title>

  <simplelist type="inline">
   <member><xref linkend="app-pgbasebackup"/></member>
  </simplelist>
 </refsect1>

</refentry>

Title: pg_verifybackup: Additional Options, Version, Help, and Examples
Summary
This section describes additional pg_verifybackup options including: -w/--wal-directory (specifies the directory for WAL files). It also covers -V/--version (prints the pg_verifybackup version), and -?/--help (shows command line arguments). Finally, it gives examples of creating and verifying backups, moving manifest files, and ignoring files during verification.