From: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pg_start_backup does not actually allow for consistent, file-level backup |
Date: | 2015-06-08 13:06:31 |
Message-ID: | 55759357.7080802@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | otheus uibk | 2015-06-08 13:13:51 | Re: pg_start_backup does not actually allow for consistent, file-level backup |
Previous Message | Albe Laurenz | 2015-06-08 13:04:11 | Re: pg_start_backup does not actually allow for consistent, file-level backup |