Re: Backup strategies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jesper Krogh wrote:
> Ivan Voras wrote:
>> Warning: DO NOT do on-the-fly binary backups without snapshots.
>> Archiving the database directory with tar on a regular file system,
>> while the server is running, will result in an archive that most likely
>> won't work when restored.
> 
> Even if you do a "pg_start_backup/pg_stop_backup" as specified here:
> 
> http://www.postgresql.org/docs/8.3/interactive/continuous-archiving.html
> => Making a Base backup.
> 
> ??
> 
> It worked when I tested it, but I may just have been darn lucky.

No, it should be ok - I just didn't catch up with the times :) At least
that's my interpretation of this paragraph in documentation:

"""Some backup tools that you might wish to use emit warnings or errors
if the files they are trying to copy change while the copy proceeds.
This situation is normal, and not an error, when taking a base backup of
an active database; so you need to ensure that you can distinguish
complaints of this sort from real errors..."""

It looks like PostgreSQL freezes the state of the "data" directory in
this case (and new data goes only to the transaction log - pg_xlog),
which effectively creates an application-level snapshot. Good to know.

Attachment: signature.asc
Description: OpenPGP digital signature


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux