Imported Upstream version 3.2.0
[debian/amanda] / man / xml-source / ampgsql.8.xml
index cea1fc5643aee4ea091988ba4cdb1329472dfff9..21fc0b79b7186319960e489c921fa834ef283bc8 100644 (file)
@@ -174,6 +174,37 @@ will be searched.
 
 </refsect1>
 
+<refsect1><title>RECOVERY</title>
+
+<para>Read the postgres documentation carefully before attempting a recovery.
+This section is only a rough guide to the process.</para>
+
+<para>The data recovered from a postgres backup consists of a data tarball and
+one or more archive tarballs.  The data contains the state of the database
+at the time the full backup was performed, and the archive tarballs contain
+postgres WAL files that must be re-run to generate a consistent
+state.</para>
+
+<para>Ensure that the database server is shut down, and move the existing data
+directory aside.  Untar the data tarball over this directory, and verify
+that ownership and permissions are correct.  Untar all of the archive
+tarballs into a single directory - the archive directory.  Create a
+<filename>recovery.conf</filename> in the data directory, owned by the
+proper user and with proper permissions.  Add a
+<command>restore_command</command> to it, e.g.,</para>
+
+<programlisting>
+restore_command = 'cp /path/to/archive_dir/%f "%p"'
+</programlisting>
+
+<para>Start the database server, and examine the logs to track the process of
+the recovery.  When the recovery is complete, the server will transition
+into a running state, and will move the <filename>recovery.conf</filename>
+file aside so that it will not attempt a recovery on the next
+invocation.</para>
+
+</refsect1>
+
 <seealso>
 <manref name="amanda.conf" vol="5"/>,
 <manref name="amanda-client.conf" vol="5"/>,