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 $ -->
22
33<chapter id="backup">
44 <title>Backup and Restore</title>
@@ -124,7 +124,7 @@ psql <replaceable class="parameter">dbname</replaceable> < <replaceable class
124124
125125 <para>
126126 By default, the <application>psql</> script will continue to
127- execute after an SQL error is encountered. Youmay wish to use the
127+ execute after an SQL error is encountered. Youmight wish to use the
128128 following command at the top of the script to alter that
129129 behaviour and have <application>psql</application> exit with an
130130 exit status of 3 if an SQL error occurs:
@@ -138,7 +138,7 @@ psql <replaceable class="parameter">dbname</replaceable> < <replaceable class
138138 passing the <option>-1</> or <option>--single-transaction</>
139139 command-line options to <application>psql</>. When using this
140140 mode, be aware that even the smallest of errors can rollback a
141- restore that has already run for many hours. However, thatmay
141+ restore that has already run for many hours. However, thatmight
142142 still be preferable to manually cleaning up a complex database
143143 after a partially restored dump.
144144 </para>
@@ -325,7 +325,7 @@ tar -cf backup.tar /usr/local/pgsql/data
325325 <listitem>
326326 <para>
327327 If you have dug into the details of the file system layout of the
328- database, youmay be tempted to try to back up or restore only certain
328+ database, youmight be tempted to try to back up or restore only certain
329329 individual tables or databases from their respective files or
330330 directories. This will <emphasis>not</> work because the
331331 information contained in these files contains only half the
@@ -360,7 +360,7 @@ tar -cf backup.tar /usr/local/pgsql/data
360360 </para>
361361
362362 <para>
363- If your database is spread across multiple file systems, theremay not
363+ If your database is spread across multiple file systems, theremight not
364364 be any way to obtain exactly-simultaneous frozen snapshots of all
365365 the volumes. For example, if your data files and WAL log are on different
366366 disks, or if tablespaces are on different file systems, it might
@@ -437,7 +437,7 @@ tar -cf backup.tar /usr/local/pgsql/data
437437 Since we can string together an indefinitely long sequence of WAL files
438438 for replay, continuous backup can be achieved simply by continuing to archive
439439 the WAL files. This is particularly valuable for large databases, where
440- itmay not be convenient to take a full backup frequently.
440+ itmight not be convenient to take a full backup frequently.
441441 </para>
442442 </listitem>
443443 <listitem>
@@ -465,7 +465,7 @@ tar -cf backup.tar /usr/local/pgsql/data
465465 <para>
466466 As with the plain file-system-backup technique, this method can only
467467 support restoration of an entire database cluster, not a subset.
468- Also, it requires a lot of archival storage: the base backupmay be bulky,
468+ Also, it requires a lot of archival storage: the base backupmight be bulky,
469469 and a busy system will generate many megabytes of WAL traffic that
470470 have to be archived. Still, it is the preferred backup technique in
471471 many situations where high reliability is needed.
@@ -534,7 +534,7 @@ archive_command = 'cp -i %p /mnt/server/archivedir/%f </dev/null'
534534</programlisting>
535535 which will copy archivable WAL segments to the directory
536536 <filename>/mnt/server/archivedir</>. (This is an example, not a
537- recommendation, andmay not work on all platforms.)
537+ recommendation, andmight not work on all platforms.)
538538 </para>
539539
540540 <para>
@@ -601,7 +601,7 @@ archive_command = 'test ! -f .../%f && cp %p .../%f'
601601
602602 <para>
603603 In writing your archive command, you should assume that the file names to
604- be archivedmay be up to 64 characters long andmay contain any
604+ be archivedcan be up to 64 characters long andcan contain any
605605 combination of ASCII letters, digits, and dots. It is not necessary to
606606 remember the original relative path (<literal>%p</>) but it is necessary to
607607 remember the file name (<literal>%f</>).
@@ -614,7 +614,7 @@ archive_command = 'test ! -f .../%f && cp %p .../%f'
614614 <filename>postgresql.conf</>, <filename>pg_hba.conf</> and
615615 <filename>pg_ident.conf</>), since those are edited manually rather
616616 than through SQL operations.
617- Youmay wish to keep the configuration files in a location that will
617+ Youmight wish to keep the configuration files in a location that will
618618 be backed up by your regular file system backup procedures. See
619619 <xref linkend="runtime-config-file-locations"> for how to relocate the
620620 configuration files.
@@ -732,7 +732,7 @@ SELECT pg_stop_backup();
732732 between <function>pg_start_backup</> and the start of the actual backup,
733733 nor between the end of the backup and <function>pg_stop_backup</>; a
734734 few minutes' delay won't hurt anything. (However, if you normally run the
735- server with <varname>full_page_writes</> disabled, youmay notice a drop
735+ server with <varname>full_page_writes</> disabled, youmight notice a drop
736736 in performance between <function>pg_start_backup</> and
737737 <function>pg_stop_backup</>, since <varname>full_page_writes</> is
738738 effectively forced on during backup mode.) You must ensure that these
@@ -750,7 +750,7 @@ SELECT pg_stop_backup();
750750 </para>
751751
752752 <para>
753- Youmay , however, omit from the backup dump the files within the
753+ Youcan , however, omit from the backup dump the files within the
754754 <filename>pg_xlog/</> subdirectory of the cluster directory. This
755755 slight complication is worthwhile because it reduces the risk
756756 of mistakes when restoring. This is easy to arrange if
@@ -775,7 +775,7 @@ SELECT pg_stop_backup();
775775 the file system backup and the WAL segment files used during the
776776 backup (as specified in the backup history file), all archived WAL
777777 segments with names numerically less are no longer needed to recover
778- the file system backup andmay be deleted. However, you should
778+ the file system backup andcan be deleted. However, you should
779779 consider keeping several backup sets to be absolutely certain that
780780 you can recover your data.
781781 </para>
@@ -842,7 +842,7 @@ SELECT pg_stop_backup();
842842 require that you have enough free space on your system to hold two
843843 copies of your existing database. If you do not have enough space,
844844 you need at the least to copy the contents of the <filename>pg_xlog</>
845- subdirectory of the cluster data directory, as itmay contain logs which
845+ subdirectory of the cluster data directory, as itmight contain logs which
846846 were not archived before the system went down.
847847 </para>
848848 </listitem>
@@ -881,7 +881,7 @@ SELECT pg_stop_backup();
881881 <listitem>
882882 <para>
883883 Create a recovery command file <filename>recovery.conf</> in the cluster
884- data directory (see <xref linkend="recovery-config-settings">). Youmay
884+ data directory (see <xref linkend="recovery-config-settings">). Youmight
885885 also want to temporarily modify <filename>pg_hba.conf</> to prevent
886886 ordinary users from connecting until you are sure the recovery has worked.
887887 </para>
@@ -917,7 +917,7 @@ SELECT pg_stop_backup();
917917 <filename>recovery.conf</> is the <varname>restore_command</>,
918918 which tells <productname>PostgreSQL</> how to get back archived
919919 WAL file segments. Like the <varname>archive_command</>, this is
920- a shell command string. Itmay contain <literal>%f</>, which is
920+ a shell command string. Itcan contain <literal>%f</>, which is
921921 replaced by the name of the desired log file, and <literal>%p</>,
922922 which is replaced by the path name to copy the log file to.
923923 (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
12281228 It should also be noted that the default <acronym>WAL</acronym>
12291229 format is fairly bulky since it includes many disk page snapshots.
12301230 These page snapshots are designed to support crash recovery, since
1231- wemay need to fix partially-written disk pages. Depending on
1232- your system hardware and software, the risk of partial writesmay
1231+ wemight need to fix partially-written disk pages. Depending on
1232+ your system hardware and software, the risk of partial writesmight
12331233 be small enough to ignore, in which case you can significantly
12341234 reduce the total volume of archived logs by turning off page
12351235 snapshots using the <xref linkend="guc-full-page-writes">
@@ -1238,7 +1238,7 @@ restore_command = 'copy /mnt/server/archivedir/%f "%p"' # Windows
12381238 use of the logs for PITR operations. An area for future
12391239 development is to compress archived WAL data by removing
12401240 unnecessary page copies even when <varname>full_page_writes</> is
1241- on. In the meantime, administratorsmay wish to reduce the number
1241+ on. In the meantime, administratorsmight wish to reduce the number
12421242 of page snapshots included in WAL by increasing the checkpoint
12431243 interval parameters as much as feasible.
12441244 </para>
@@ -1522,15 +1522,15 @@ if (!triggered)
15221522 connectivity between the two and the viability of the primary. It is
15231523 also possible to use a third system (called a witness server) to avoid
15241524 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
15261526 rigorous testing.
15271527 </para>
15281528
15291529 <para>
15301530 Once failover to the standby occurs, we have only a
15311531 single server in operation. This is known as a degenerate state.
15321532 The former standby is now the primary, but the former primary is down
1533- andmay stay down. To return to normal operation we must
1533+ andmight stay down. To return to normal operation we must
15341534 fully recreate a standby server,
15351535 either on the former primary system when it comes up, or on a third,
15361536 possibly new, system. Once complete the primary and standby can be
@@ -1662,7 +1662,7 @@ if (!triggered)
16621662 It is recommended that you use the <application>pg_dump</> and
16631663 <application>pg_dumpall</> programs from the newer version of
16641664 <productname>PostgreSQL</>, to take advantage of any enhancements
1665- thatmay have been made in these programs. Current releases of the
1665+ thatmight have been made in these programs. Current releases of the
16661666 dump programs can read data from any server version back to 7.0.
16671667 </para>
16681668
@@ -1716,7 +1716,7 @@ psql -f backup postgres
17161716 <note>
17171717 <para>
17181718 When you <quote>move the old installation out of the way</quote>
1719- itmay no longer be perfectly usable. Some of the executable programs
1719+ itmight no longer be perfectly usable. Some of the executable programs
17201720 contain absolute paths to various installed programs and data files.
17211721 This is usually not a big problem but if you plan on using two
17221722 installations in parallel for a while you should assign them