Revision 13292
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/web/links/index.htm | ||
---|---|---|
788 | 788 |
<DD>"To prepare for low level standalone hot backups, set wal_level to archive (or hot_standby), archive_mode to on, and set up an archive_command that performs archiving only when a switch file exists." |
789 | 789 |
|
790 | 790 |
to work with a filesystem-level backup, you need a WAL chain that's at least long enough (time-wise) for the WAL blocks created when it starts copying base/ to still be around when it finishes copying pg_xlog/ (it must also copy in alphabetical order, and not in parallel). |
791 |
<DT><A HREF="http://www.postgresql.org/docs/9.3/static/runtime-config-replication.html#GUC-WAL-KEEP-SEGMENTS" name="http://www.postgresql.org/docs/9.3/static/runtime-config-replication.html#GUC-WAL-KEEP-SEGMENTS" ADD_DATE="1398196461" ICON_URI="http://www.postgresql.org/favicon.ico" LAST_CHARSET="UTF-8"><img width="16" height="16" src="http://www.postgresql.org/favicon.ico" style="margin-right: 0.5em;"/>*** PostgreSQL: Documentation: 9.3: Replication: wal_keep_segments</A><a name="*** PostgreSQL: Documentation: 9.3: Replication: wal_keep_segments" href="#*** PostgreSQL: Documentation: 9.3: Replication: wal_keep_segments" style="margin-left: 0.5em;">¶</a>
|
|
792 |
<DD>page's self-description: online backups:
|
|
791 |
<DT><A HREF="http://www.postgresql.org/docs/9.3/static/runtime-config-replication.html#GUC-WAL-KEEP-SEGMENTS" name="http://www.postgresql.org/docs/9.3/static/runtime-config-replication.html#GUC-WAL-KEEP-SEGMENTS" ADD_DATE="1398234626" ICON_URI="http://www.postgresql.org/favicon.ico" LAST_CHARSET="UTF-8"><img width="16" height="16" src="http://www.postgresql.org/favicon.ico" style="margin-right: 0.5em;"/>*** PostgreSQL: Documentation: 9.3: Replication: wal_keep_segments</A><a name="*** PostgreSQL: Documentation: 9.3: Replication: wal_keep_segments" href="#*** PostgreSQL: Documentation: 9.3: Replication: wal_keep_segments" style="margin-left: 0.5em;">¶</a>
|
|
792 |
<DD>"wal_keep_segments (integer)
|
|
793 | 793 |
|
794 |
pg_start_backup() method: |
|
795 |
(more reliable, but requires putting the DB server into a special mode during backup) |
|
796 |
# configure: |
|
797 |
## in postgresql.conf, set wal_level = hot_standby |
|
798 |
## $ sudo service postgresql restart |
|
799 |
# run: |
|
800 |
## $ sudo -u postgres psql <<<"SELECT pg_start_backup('backup', true);" |
|
801 |
## copy files using rsync, etc. |
|
802 |
## $ sudo -u postgres psql <<<"SELECT pg_stop_backup();" |
|
803 |
|
|
804 |
wal_keep_segments method: |
|
805 |
(less reliable, but the backup is completely independent of the DB server) |
|
806 |
# configure: |
|
807 |
## in postgresql.conf: |
|
808 |
### set wal_level = hot_standby |
|
809 |
### set wal_keep_segments to long enough that the WAL chain spans the duration of the backup |
|
810 |
#### to determine this, measure how quickly WAL segments are created at peak DB usage |
|
811 |
## $ sudo service postgresql restart |
|
812 |
# run: |
|
813 |
## copy files using rsync, etc. |
|
814 |
## copy again to get changes since last backup |
|
815 |
## copy again to make sure there are no more changes |
|
816 |
|
|
817 |
offline backups: |
|
818 |
|
|
819 |
# copy files using rsync, etc. |
|
820 |
# copy again to get changes since last backup |
|
821 |
# $ sudo service postgresql stop |
|
822 |
# copy again to make the copy a consistent snapshot |
|
823 |
# $ sudo service postgresql start |
|
794 |
Specifies the minimum number of past log file segments kept in the pg_xlog directory" |
|
824 | 795 |
<DT><A HREF="http://michael.otacoo.com/postgresql-2/postgres-9-3-feature-highlight-parallel-pg_dump/" name="http://michael.otacoo.com/postgresql-2/postgres-9-3-feature-highlight-parallel-pg_dump/" ADD_DATE="1397769449" ICON_URI="http://michael.otacoo.com/content/favicon_otacoo.gif" LAST_CHARSET="UTF-8"><img width="16" height="16" src="http://michael.otacoo.com/content/favicon_otacoo.gif" style="margin-right: 0.5em;"/>Postgres 9.3 feature highlight: parallel pg_dump</A><a name="Postgres 9.3 feature highlight: parallel pg_dump" href="#Postgres 9.3 feature highlight: parallel pg_dump" style="margin-left: 0.5em;">¶</a> |
825 | 796 |
<DD>page's self-description: Postgres 9.3 feature highlight: parallel pg_dump |
826 | 797 |
<DT><A HREF="http://www.postgresql.org/docs/9.3/static/sql-checkpoint.html" name="http://www.postgresql.org/docs/9.3/static/sql-checkpoint.html" ADD_DATE="1398205258" ICON_URI="http://www.postgresql.org/favicon.ico" LAST_CHARSET="UTF-8"><img width="16" height="16" src="http://www.postgresql.org/favicon.ico" style="margin-right: 0.5em;"/>PostgreSQL: Documentation: 9.3: CHECKPOINT</A><a name="PostgreSQL: Documentation: 9.3: CHECKPOINT" href="#PostgreSQL: Documentation: 9.3: CHECKPOINT" style="margin-left: 0.5em;">¶</a> |
Also available in: Unified diff
fix: web/links/index.htm: updated to Firefox bookmarks: PostgreSQL: backups: wal_keep_segments: restored annotations