|
1 | 1 | <!-- |
2 | | -$PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.61 2005/04/17 03:05:19 momjian Exp $ |
| 2 | +$PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.62 2005/04/18 01:29:00 momjian Exp $ |
3 | 3 | --> |
4 | 4 | <chapter id="backup"> |
5 | 5 | <title>Backup and Restore</title> |
@@ -724,23 +724,32 @@ SELECT pg_stop_backup(); |
724 | 724 |
|
725 | 725 | <para> |
726 | 726 | To make use of this backup, you will need to keep around all the WAL |
727 | | - segment files generated at or after the starting time of the backup. |
| 727 | + segment files generated during and after the file system backup. |
728 | 728 | To aid you in doing this, the <function>pg_stop_backup</> function |
729 | | - creates a <firstterm>backup history file</> that is immediately stored |
730 | | - into the WAL archive area. This file is named after the first WAL |
731 | | - segment file that you need to have to make use of the backup. For |
732 | | - example, if the starting WAL file is <literal>0000000100001234000055CD</> |
733 | | - the backup history file will be named something like |
734 | | - <literal>0000000100001234000055CD.007C9330.backup</>. (The second part of |
735 | | - this file name stands for an exact position within the WAL file, and can |
736 | | - ordinarily be ignored.) Once you have safely archived this WAL |
737 | | - segment file, you can delete all archived WAL segments with names numerically |
738 | | - preceding this one. The backup history file is just a small text file. |
739 | | - It contains the label string you gave to <function>pg_start_backup</>, as |
740 | | - well as the starting and ending times of the backup. If you used the |
741 | | - label to identify where the associated dump file is kept, then the |
742 | | - archived history file is enough to tell you which dump file to restore, |
743 | | - should you need to do so. |
| 729 | + creates a <firstterm>backup history file</> that is immediately |
| 730 | + stored into the WAL archive area. This file is named after the first |
| 731 | + WAL segment file that you need to have to make use of the backup. |
| 732 | + For example, if the starting WAL file is |
| 733 | + <literal>0000000100001234000055CD</> the backup history file will be |
| 734 | + named something like |
| 735 | + <literal>0000000100001234000055CD.007C9330.backup</>. (The second |
| 736 | + number in the file name stands for an exact position within the WAL |
| 737 | + file, and can ordinarily be ignored.) Once you have safely archived |
| 738 | + the WAL segment files used during the file system backup (as |
| 739 | + specified in the backup history file), you can delete all archived |
| 740 | + WAL segments with names numerically less. Keep in mind that only |
| 741 | + completed WAL segment files are archived, so there will be delay |
| 742 | + between running <function>pg_stop_backup</> and the archiving of |
| 743 | + all WAL segment files needed to make the file system backup |
| 744 | + consistent. |
| 745 | + </para> |
| 746 | + <para> |
| 747 | + The backup history file is just a small text file. It contains the |
| 748 | + label string you gave to <function>pg_start_backup</>, as well as |
| 749 | + the starting and ending times of the backup. If you used the label |
| 750 | + to identify where the associated dump file is kept, then the |
| 751 | + archived history file is enough to tell you which dump file to |
| 752 | + restore, should you need to do so. |
744 | 753 | </para> |
745 | 754 |
|
746 | 755 | <para> |
|
0 commit comments