11<!--
2- $Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.30 2003/08/31 17:32:18 petere Exp $
2+ $Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.31 2003/11/04 09:55:38 petere Exp $
33-->
44<chapter id="backup">
55 <title>Backup and Restore</title>
@@ -155,8 +155,9 @@ pg_dump -h <replaceable>host1</> <replaceable>dbname</> | psql -h <replaceable>h
155155
156156 <tip>
157157 <para>
158- Restore performance can be improved by increasing <literal>SORT_MEM</>
159- (see <xref linkend="runtime-config-resource-memory">).
158+ Restore performance can be improved by increasing the
159+ configuration parameter <varname>sort_mem</varname> (see <xref
160+ linkend="runtime-config-resource-memory">).
160161 </para>
161162 </tip>
162163 </sect2>
@@ -333,12 +334,9 @@ tar -cf backup.tar /usr/local/pgsql/data
333334 going on. For this reason it is also not advisable to trust file
334335 systems that claim to support <quote>consistent
335336 snapshots</quote>. Information about stopping the server can be
336- found in <xref linkend="postmaster-shutdown">.
337- </para>
338-
339- <para>
340- Needless to say that you also need to shut down the server
341- before restoring the data.
337+ found in <xref linkend="postmaster-shutdown">. Needless to say
338+ that you also need to shut down the server before restoring the
339+ data.
342340 </para>
343341 </listitem>
344342
@@ -362,7 +360,18 @@ tar -cf backup.tar /usr/local/pgsql/data
362360 </para>
363361
364362 <para>
365- Also note that the file system backup will not necessarily be
363+ An alternative file-system backup approach is to make a
364+ <quote>consistent snapshot</quote> of the data directory, if the
365+ file system supports that functionality. Such a snapshot will save
366+ the database files in a state where the database server was not
367+ properly shut down; therefore, when you start the database server
368+ on this backed up directory, it will think the server had crashed
369+ and replay the WAL log. This is not a problem, just be aware of
370+ it.
371+ </para>
372+
373+ <para>
374+ Note that the file system backup will not necessarily be
366375 smaller than an SQL dump. On the contrary, it will most likely be
367376 larger. (<application>pg_dump</application> does not need to dump
368377 the contents of indexes for example, just the commands to recreate
@@ -372,7 +381,7 @@ tar -cf backup.tar /usr/local/pgsql/data
372381 </sect1>
373382
374383 <sect1 id="migration">
375- <title>Migrationbetween releases </title>
384+ <title>MigrationBetween Releases </title>
376385
377386 <indexterm zone="migration">
378387 <primary>upgrading</primary>
@@ -385,17 +394,20 @@ tar -cf backup.tar /usr/local/pgsql/data
385394
386395 <para>
387396 As a general rule, the internal data storage format is subject to
388- change between releases of <productname>PostgreSQL</>. This does not
389- apply to different <quote>patch levels</quote>, these always have
390- compatible storage formats. For example, releases 7.0.1, 7.1.2, and
391- 7.2 are not compatible, whereas 7.1.1 and 7.1.2 are. When you
392- update between compatible versions, then you can simply reuse the
393- data area in disk by the new executables. Otherwise you need to
397+ change between major releases of <productname>PostgreSQL</> (where
398+ the number after the first dot changes). This does not apply to
399+ different minor releases under the same major release (where the
400+ number of the second dot changes); these always have compatible
401+ storage formats. For example, releases 7.0.1, 7.1.2, and 7.2 are
402+ not compatible, whereas 7.1.1 and 7.1.2 are. When you update
403+ between compatible versions, then you can simply reuse the data
404+ area in disk by the new executables. Otherwise you need to
394405 <quote>back up</> your data and <quote>restore</> it on the new
395406 server, using <application>pg_dump</>. (There are checks in place
396407 that prevent you from doing the wrong thing, so no harm can be done
397408 by confusing these things.) The precise installation procedure is
398- not subject of this section; these details are in <xref linkend="installation">.
409+ not subject of this section; these details are in <xref
410+ linkend="installation">.
399411 </para>
400412
401413 <para>