1
1
<!--
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 $
3
3
-->
4
4
<chapter id="backup">
5
5
<title>Backup and Restore</title>
@@ -155,8 +155,9 @@ pg_dump -h <replaceable>host1</> <replaceable>dbname</> | psql -h <replaceable>h
155
155
156
156
<tip>
157
157
<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">).
160
161
</para>
161
162
</tip>
162
163
</sect2>
@@ -333,12 +334,9 @@ tar -cf backup.tar /usr/local/pgsql/data
333
334
going on. For this reason it is also not advisable to trust file
334
335
systems that claim to support <quote>consistent
335
336
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.
342
340
</para>
343
341
</listitem>
344
342
@@ -362,7 +360,18 @@ tar -cf backup.tar /usr/local/pgsql/data
362
360
</para>
363
361
364
362
<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
366
375
smaller than an SQL dump. On the contrary, it will most likely be
367
376
larger. (<application>pg_dump</application> does not need to dump
368
377
the contents of indexes for example, just the commands to recreate
@@ -372,7 +381,7 @@ tar -cf backup.tar /usr/local/pgsql/data
372
381
</sect1>
373
382
374
383
<sect1 id="migration">
375
- <title>Migration between releases </title>
384
+ <title>Migration Between Releases </title>
376
385
377
386
<indexterm zone="migration">
378
387
<primary>upgrading</primary>
@@ -385,17 +394,20 @@ tar -cf backup.tar /usr/local/pgsql/data
385
394
386
395
<para>
387
396
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
394
405
<quote>back up</> your data and <quote>restore</> it on the new
395
406
server, using <application>pg_dump</>. (There are checks in place
396
407
that prevent you from doing the wrong thing, so no harm can be done
397
408
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">.
399
411
</para>
400
412
401
413
<para>
0 commit comments