Re: pg_start_backup does not actually allow for consistent, file-level backup

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: pg_start_backup does not actually allow for consistent, file-level backup
Дата
Msg-id 55759357.7080802@2ndquadrant.com
обсуждение исходный текст
Ответ на pg_start_backup does not actually allow for consistent, file-level backup  (otheus uibk <otheus.uibk@gmail.com>)
Список pgsql-general
On 06/08/15 14:45, otheus uibk wrote:
> The manual and in this mailing list, the claim is made that consistent,
> file-level backups may be made by bracketing the file-copy operation
> with the postgresql pg_start_backup and pg_stop_backup operations.  Many
> people including myself have found that in some circumstances, using
> "tar" to copy these files will result in an error if one of the data
> files changes during the tar operation. The responses to those queries
> on this mailing list are unsatisfactory ("everything is fine, trust us").

I don't really see what you find unsatisfactory on those responses?
While performing the backup, the database is running and either
modifying or even deleting the files. Tar does not expect that, and thus
emits warnings/errors. That's clearly explained in the docs, and
actually linked in one of the comments you quoted. And pg_start_backup
takes care of that.

If you don't like that, you have multiple options - stop the database
while performing the backup, perform file system level backup (e.g. lvm
snapshot) or use tools like pg_basebackup.

regards

--
Tomas Vondra                   http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: pg_start_backup does not actually allow for consistent, file-level backup
Следующее
От: otheus uibk
Дата:
Сообщение: Re: pg_start_backup does not actually allow for consistent, file-level backup