1
- <!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.95 2006/12/01 03:29:15 tgl Exp $ -->
1
+ <!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.96 2007/01/31 20:56:16 momjian Exp $ -->
2
2
3
3
<chapter id="backup">
4
4
<title>Backup and Restore</title>
@@ -124,7 +124,7 @@ psql <replaceable class="parameter">dbname</replaceable> < <replaceable class
124
124
125
125
<para>
126
126
By default, the <application>psql</> script will continue to
127
- execute after an SQL error is encountered. You may wish to use the
127
+ execute after an SQL error is encountered. You might wish to use the
128
128
following command at the top of the script to alter that
129
129
behaviour and have <application>psql</application> exit with an
130
130
exit status of 3 if an SQL error occurs:
@@ -138,7 +138,7 @@ psql <replaceable class="parameter">dbname</replaceable> < <replaceable class
138
138
passing the <option>-1</> or <option>--single-transaction</>
139
139
command-line options to <application>psql</>. When using this
140
140
mode, be aware that even the smallest of errors can rollback a
141
- restore that has already run for many hours. However, that may
141
+ restore that has already run for many hours. However, that might
142
142
still be preferable to manually cleaning up a complex database
143
143
after a partially restored dump.
144
144
</para>
@@ -325,7 +325,7 @@ tar -cf backup.tar /usr/local/pgsql/data
325
325
<listitem>
326
326
<para>
327
327
If you have dug into the details of the file system layout of the
328
- database, you may be tempted to try to back up or restore only certain
328
+ database, you might be tempted to try to back up or restore only certain
329
329
individual tables or databases from their respective files or
330
330
directories. This will <emphasis>not</> work because the
331
331
information contained in these files contains only half the
@@ -360,7 +360,7 @@ tar -cf backup.tar /usr/local/pgsql/data
360
360
</para>
361
361
362
362
<para>
363
- If your database is spread across multiple file systems, there may not
363
+ If your database is spread across multiple file systems, there might not
364
364
be any way to obtain exactly-simultaneous frozen snapshots of all
365
365
the volumes. For example, if your data files and WAL log are on different
366
366
disks, or if tablespaces are on different file systems, it might
@@ -437,7 +437,7 @@ tar -cf backup.tar /usr/local/pgsql/data
437
437
Since we can string together an indefinitely long sequence of WAL files
438
438
for replay, continuous backup can be achieved simply by continuing to archive
439
439
the WAL files. This is particularly valuable for large databases, where
440
- it may not be convenient to take a full backup frequently.
440
+ it might not be convenient to take a full backup frequently.
441
441
</para>
442
442
</listitem>
443
443
<listitem>
@@ -465,7 +465,7 @@ tar -cf backup.tar /usr/local/pgsql/data
465
465
<para>
466
466
As with the plain file-system-backup technique, this method can only
467
467
support restoration of an entire database cluster, not a subset.
468
- Also, it requires a lot of archival storage: the base backup may be bulky,
468
+ Also, it requires a lot of archival storage: the base backup might be bulky,
469
469
and a busy system will generate many megabytes of WAL traffic that
470
470
have to be archived. Still, it is the preferred backup technique in
471
471
many situations where high reliability is needed.
@@ -534,7 +534,7 @@ archive_command = 'cp -i %p /mnt/server/archivedir/%f </dev/null'
534
534
</programlisting>
535
535
which will copy archivable WAL segments to the directory
536
536
<filename>/mnt/server/archivedir</>. (This is an example, not a
537
- recommendation, and may not work on all platforms.)
537
+ recommendation, and might not work on all platforms.)
538
538
</para>
539
539
540
540
<para>
@@ -601,7 +601,7 @@ archive_command = 'test ! -f .../%f && cp %p .../%f'
601
601
602
602
<para>
603
603
In writing your archive command, you should assume that the file names to
604
- be archived may be up to 64 characters long and may contain any
604
+ be archived can be up to 64 characters long and can contain any
605
605
combination of ASCII letters, digits, and dots. It is not necessary to
606
606
remember the original relative path (<literal>%p</>) but it is necessary to
607
607
remember the file name (<literal>%f</>).
@@ -614,7 +614,7 @@ archive_command = 'test ! -f .../%f && cp %p .../%f'
614
614
<filename>postgresql.conf</>, <filename>pg_hba.conf</> and
615
615
<filename>pg_ident.conf</>), since those are edited manually rather
616
616
than through SQL operations.
617
- You may wish to keep the configuration files in a location that will
617
+ You might wish to keep the configuration files in a location that will
618
618
be backed up by your regular file system backup procedures. See
619
619
<xref linkend="runtime-config-file-locations"> for how to relocate the
620
620
configuration files.
@@ -732,7 +732,7 @@ SELECT pg_stop_backup();
732
732
between <function>pg_start_backup</> and the start of the actual backup,
733
733
nor between the end of the backup and <function>pg_stop_backup</>; a
734
734
few minutes' delay won't hurt anything. (However, if you normally run the
735
- server with <varname>full_page_writes</> disabled, you may notice a drop
735
+ server with <varname>full_page_writes</> disabled, you might notice a drop
736
736
in performance between <function>pg_start_backup</> and
737
737
<function>pg_stop_backup</>, since <varname>full_page_writes</> is
738
738
effectively forced on during backup mode.) You must ensure that these
@@ -750,7 +750,7 @@ SELECT pg_stop_backup();
750
750
</para>
751
751
752
752
<para>
753
- You may , however, omit from the backup dump the files within the
753
+ You can , however, omit from the backup dump the files within the
754
754
<filename>pg_xlog/</> subdirectory of the cluster directory. This
755
755
slight complication is worthwhile because it reduces the risk
756
756
of mistakes when restoring. This is easy to arrange if
@@ -775,7 +775,7 @@ SELECT pg_stop_backup();
775
775
the file system backup and the WAL segment files used during the
776
776
backup (as specified in the backup history file), all archived WAL
777
777
segments with names numerically less are no longer needed to recover
778
- the file system backup and may be deleted. However, you should
778
+ the file system backup and can be deleted. However, you should
779
779
consider keeping several backup sets to be absolutely certain that
780
780
you can recover your data.
781
781
</para>
@@ -842,7 +842,7 @@ SELECT pg_stop_backup();
842
842
require that you have enough free space on your system to hold two
843
843
copies of your existing database. If you do not have enough space,
844
844
you need at the least to copy the contents of the <filename>pg_xlog</>
845
- subdirectory of the cluster data directory, as it may contain logs which
845
+ subdirectory of the cluster data directory, as it might contain logs which
846
846
were not archived before the system went down.
847
847
</para>
848
848
</listitem>
@@ -881,7 +881,7 @@ SELECT pg_stop_backup();
881
881
<listitem>
882
882
<para>
883
883
Create a recovery command file <filename>recovery.conf</> in the cluster
884
- data directory (see <xref linkend="recovery-config-settings">). You may
884
+ data directory (see <xref linkend="recovery-config-settings">). You might
885
885
also want to temporarily modify <filename>pg_hba.conf</> to prevent
886
886
ordinary users from connecting until you are sure the recovery has worked.
887
887
</para>
@@ -917,7 +917,7 @@ SELECT pg_stop_backup();
917
917
<filename>recovery.conf</> is the <varname>restore_command</>,
918
918
which tells <productname>PostgreSQL</> how to get back archived
919
919
WAL file segments. Like the <varname>archive_command</>, this is
920
- a shell command string. It may contain <literal>%f</>, which is
920
+ a shell command string. It can contain <literal>%f</>, which is
921
921
replaced by the name of the desired log file, and <literal>%p</>,
922
922
which is replaced by the path name to copy the log file to.
923
923
(The path name is relative to the working directory of the server,
@@ -1228,8 +1228,8 @@ restore_command = 'copy /mnt/server/archivedir/%f "%p"' # Windows
1228
1228
It should also be noted that the default <acronym>WAL</acronym>
1229
1229
format is fairly bulky since it includes many disk page snapshots.
1230
1230
These page snapshots are designed to support crash recovery, since
1231
- we may need to fix partially-written disk pages. Depending on
1232
- your system hardware and software, the risk of partial writes may
1231
+ we might need to fix partially-written disk pages. Depending on
1232
+ your system hardware and software, the risk of partial writes might
1233
1233
be small enough to ignore, in which case you can significantly
1234
1234
reduce the total volume of archived logs by turning off page
1235
1235
snapshots using the <xref linkend="guc-full-page-writes">
@@ -1238,7 +1238,7 @@ restore_command = 'copy /mnt/server/archivedir/%f "%p"' # Windows
1238
1238
use of the logs for PITR operations. An area for future
1239
1239
development is to compress archived WAL data by removing
1240
1240
unnecessary page copies even when <varname>full_page_writes</> is
1241
- on. In the meantime, administrators may wish to reduce the number
1241
+ on. In the meantime, administrators might wish to reduce the number
1242
1242
of page snapshots included in WAL by increasing the checkpoint
1243
1243
interval parameters as much as feasible.
1244
1244
</para>
@@ -1522,15 +1522,15 @@ if (!triggered)
1522
1522
connectivity between the two and the viability of the primary. It is
1523
1523
also possible to use a third system (called a witness server) to avoid
1524
1524
some problems of inappropriate failover, but the additional complexity
1525
- may not be worthwhile unless it is set-up with sufficient care and
1525
+ might not be worthwhile unless it is set-up with sufficient care and
1526
1526
rigorous testing.
1527
1527
</para>
1528
1528
1529
1529
<para>
1530
1530
Once failover to the standby occurs, we have only a
1531
1531
single server in operation. This is known as a degenerate state.
1532
1532
The former standby is now the primary, but the former primary is down
1533
- and may stay down. To return to normal operation we must
1533
+ and might stay down. To return to normal operation we must
1534
1534
fully recreate a standby server,
1535
1535
either on the former primary system when it comes up, or on a third,
1536
1536
possibly new, system. Once complete the primary and standby can be
@@ -1662,7 +1662,7 @@ if (!triggered)
1662
1662
It is recommended that you use the <application>pg_dump</> and
1663
1663
<application>pg_dumpall</> programs from the newer version of
1664
1664
<productname>PostgreSQL</>, to take advantage of any enhancements
1665
- that may have been made in these programs. Current releases of the
1665
+ that might have been made in these programs. Current releases of the
1666
1666
dump programs can read data from any server version back to 7.0.
1667
1667
</para>
1668
1668
@@ -1716,7 +1716,7 @@ psql -f backup postgres
1716
1716
<note>
1717
1717
<para>
1718
1718
When you <quote>move the old installation out of the way</quote>
1719
- it may no longer be perfectly usable. Some of the executable programs
1719
+ it might no longer be perfectly usable. Some of the executable programs
1720
1720
contain absolute paths to various installed programs and data files.
1721
1721
This is usually not a big problem but if you plan on using two
1722
1722
installations in parallel for a while you should assign them
0 commit comments