Re: Use tar to online backup has an error

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: David Steele <david(at)pgmasters(dot)net>
Cc: Yves Dorfsman <yves(at)zioup(dot)com>, pgsql-general(at)postgresql(dot)org, maxiangqian(at)gmail(dot)com
Subject: Re: Use tar to online backup has an error
Date: 2015-09-24 14:15:17
Message-ID: 20150924141517.GY3685@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

* David Steele (david(at)pgmasters(dot)net) wrote:
> It's actually perfectly normal for files to disappear during a
> backup, even when pg_start_backup() is called first (never perform
> file-level backup with calling pg_start_backup()). The database

*without* calling pg_start_backup, you mean. :)

> All of this is reconciled during the replay of WAL after a restore.

... which is why archive_command must be set and the WAL files must be
archived, otherwise PG can't go back and replay those changes.

> Another option is to use purpose-built backup software such as
> pgBackRest or barman, both of which are open source.

+100. Rolling your own backup solution for PG really stinks and is
difficult to get right. Use something which knows about all of the
above, verifies that all the necessary WAL is archived, does all of the
correct fsync's for the WAL files when they're saved, handles failure
gracefully, etc, etc.

Thanks!

Stephen

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Steele 2015-09-24 14:18:26 Re: Use tar to online backup has an error
Previous Message David Steele 2015-09-24 14:08:10 Re: Use tar to online backup has an error