How to do incremental / differential backup every hour in Postgres 9.1?

Поиск
Список
Период
Сортировка
От Neil McGuigan
Тема How to do incremental / differential backup every hour in Postgres 9.1?
Дата
Msg-id CAEO=d1ONxt6x-44ee8TjWBwtVgje9AbWuxfYZCww6vpSdht4Fg@mail.gmail.com
обсуждение исходный текст
Ответы Re: How to do incremental / differential backup every hour in Postgres 9.1?  (Amit Langote <amitlangote09@gmail.com>)
Re: How to do incremental / differential backup every hour in Postgres 9.1?  (amulsul <sul_amul@yahoo.co.in>)
Re: How to do incremental / differential backup every hour in Postgres 9.1?  (Giuseppe Broccolo <giuseppe.broccolo@2ndquadrant.it>)
Re: How to do incremental / differential backup every hour in Postgres 9.1?  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-general
Trying to do an hourly hot incremental backup of a single postgres server (windows).

I have the following setup in postgresql.conf:

max_wal_senders=2
wal_level=archive
archive_mode=on
archive_command='copy "%p" "c:\\postgres\\archive\\%f"'
I did a base backup with pg_basebackup -U postgres -D ..\archive -Ft -l 2013-07-07 -x

Which made a big base.tar file in the archive folder and added some long file name files, which I assume are the WALs.

pg_start_backup('label') and pg_stop_backup() seem to create the WAL files in xp_log, and then copy them to the archive folder.

Questions:

1. what command(s) do I run to do a new incremental backup (pg_basebackup does a new base backup which I don't want right now)? do I just run select pg_start_backup('label'); select pg_stop_backup(); on a schedule?

2. What does the label in pg_basebackup and pg_start_backup() do exactly?

3. WAL Files don't seem to be removed from pg_xlog. What should I do about that? It seems to keep 5 or so WALs in pg_xlog. Is that to be expected?

4. Do I need to backup the .backup files in the archive folder or just the 16,384KB WAL files?

5. should I use the --xlog parameter and if so do I need to change wal_keep_segments from 0?

Thanks!

Neil

В списке pgsql-general по дате отправления:

Предыдущее
От: Sébastien Lorion
Дата:
Сообщение: Re: Why are stored procedures looked on so negatively?
Следующее
От: "Janek Sendrowski"
Дата:
Сообщение: Fastest Index/Algorithm to find similar sentences