1- <!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.96 2007/01/31 20:56 :16 momjian Exp $ -->
1+ <!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.97 2007/02/01 00:28 :16 momjian Exp $ -->
22
33<chapter id="backup">
44 <title>Backup and Restore</title>
@@ -221,20 +221,20 @@ psql -f <replaceable class="parameter">infile</replaceable> postgres
221221 <title>Use compressed dumps.</title>
222222 <para>
223223 You can use your favorite compression program, for example
224- <application>gzip</application>.
224+ <application>gzip</application>:
225225
226226<programlisting>
227227pg_dump <replaceable class="parameter">dbname</replaceable> | gzip > <replaceable class="parameter">filename</replaceable>.gz
228228</programlisting>
229229
230- Reload with
230+ Reload with:
231231
232232<programlisting>
233233createdb <replaceable class="parameter">dbname</replaceable>
234234gunzip -c <replaceable class="parameter">filename</replaceable>.gz | psql <replaceable class="parameter">dbname</replaceable>
235235</programlisting>
236236
237- or
237+ or:
238238
239239<programlisting>
240240cat <replaceable class="parameter">filename</replaceable>.gz | gunzip | psql <replaceable class="parameter">dbname</replaceable>
@@ -254,7 +254,7 @@ cat <replaceable class="parameter">filename</replaceable>.gz | gunzip | psql <re
254254pg_dump <replaceable class="parameter">dbname</replaceable> | split -b 1m - <replaceable class="parameter">filename</replaceable>
255255</programlisting>
256256
257- Reload with
257+ Reload with:
258258
259259<programlisting>
260260createdb <replaceable class="parameter">dbname</replaceable>
@@ -296,7 +296,7 @@ pg_dump -Fc <replaceable class="parameter">dbname</replaceable> > <replaceabl
296296 <xref linkend="creating-cluster"> it is explained where these files
297297 are located, but you have probably found them already if you are
298298 interested in this method. You can use whatever method you prefer
299- for doing usual file system backups, for example
299+ for doing usual file system backups, for example:
300300
301301<programlisting>
302302tar -cf backup.tar /usr/local/pgsql/data
@@ -528,7 +528,7 @@ tar -cf backup.tar /usr/local/pgsql/data
528528 i.e., the cluster's data directory.)
529529 Write <literal>%%</> if you need to embed an actual <literal>%</>
530530 character in the command. The simplest useful command is something
531- like
531+ like:
532532<programlisting>
533533archive_command = 'cp -i %p /mnt/server/archivedir/%f </dev/null'
534534</programlisting>
@@ -568,7 +568,7 @@ archive_command = 'cp -i %p /mnt/server/archivedir/%f </dev/null'
568568 this correctly on some platforms but not others. If the chosen command
569569 does not itself handle this case correctly, you should add a command
570570 to test for pre-existence of the archive file. For example, something
571- like
571+ like:
572572<programlisting>
573573archive_command = 'test ! -f .../%f && cp %p .../%f'
574574</programlisting>
@@ -657,7 +657,7 @@ archive_command = 'test ! -f .../%f && cp %p .../%f'
657657 </listitem>
658658 <listitem>
659659 <para>
660- Connect to the database as a superuser, and issue the command
660+ Connect to the database as a superuser, and issue the command:
661661<programlisting>
662662SELECT pg_start_backup('label');
663663</programlisting>
@@ -685,7 +685,7 @@ SELECT pg_start_backup('label');
685685 </listitem>
686686 <listitem>
687687 <para>
688- Again connect to the database as a superuser, and issue the command
688+ Again connect to the database as a superuser, and issue the command:
689689<programlisting>
690690SELECT pg_stop_backup();
691691</programlisting>
@@ -924,7 +924,7 @@ SELECT pg_stop_backup();
924924 i.e., the cluster's data directory.)
925925 Write <literal>%%</> if you need to embed an actual <literal>%</>
926926 character in the command. The simplest useful command is
927- something like
927+ something like:
928928<programlisting>
929929restore_command = 'cp /mnt/server/archivedir/%f %p'
930930</programlisting>
@@ -1669,7 +1669,7 @@ if (!triggered)
16691669 <para>
16701670 The least downtime can be achieved by installing the new server in
16711671 a different directory and running both the old and the new servers
1672- in parallel, on different ports. Then you can use something like
1672+ in parallel, on different ports. Then you can use something like:
16731673
16741674<programlisting>
16751675pg_dumpall -p 5432 | psql -d postgres -p 6543