Re: Updated backup APIs for non-exclusive backups

2018-12-12 Thread David Steele
On 12/12/18 12:58 AM, Laurenz Albe wrote: > On Tue, 2018-12-11 at 23:43 -0500, David Steele wrote: > [about managing backups from pre- and post-file-system-backup scrips] >>> I have come up with some sample code here: >>> https://github.com/cybertec-postgresql/safe-backup >>> >>> This just uses

Re: Updated backup APIs for non-exclusive backups

2018-12-11 Thread Laurenz Albe
On Tue, 2018-12-11 at 23:43 -0500, David Steele wrote: > > > > [about managing backups from pre- and post-file-system-backup scrips] > > I have come up with some sample code here: > > https://github.com/cybertec-postgresql/safe-backup > > > > This just uses bash and psql. > > Does that look reason

Re: Updated backup APIs for non-exclusive backups

2018-12-11 Thread David Steele
On 12/11/18 5:33 PM, Laurenz Albe wrote: > On Mon, 2018-11-26 at 10:18 +0100, Magnus Hagander wrote: >>> [about managing backups from pre- and post-file-system-backup scrips] I agree with your point that it's not an uncommon thing to need. If a good solution for it can be proposed t

Re: Updated backup APIs for non-exclusive backups

2018-12-11 Thread Laurenz Albe
On Mon, 2018-11-26 at 10:18 +0100, Magnus Hagander wrote: > > [about managing backups from pre- and post-file-system-backup scrips] > > > I agree with your point that it's not an uncommon thing to need. If a > > > good solution > > > for it can be proposed that requires the exclusive backup interf

Re: Updated backup APIs for non-exclusive backups

2018-11-26 Thread Stephen Frost
Greetings, * Laurenz Albe (laurenz.a...@cybertec.at) wrote: > On Sun, 2018-11-25 at 16:04 -0500, Stephen Frost wrote: > > > Yes, you can come up with a post-backup script that somehow communicates > > > with your pre-backup script to get the information, but it sure is > > > inconvenient. Simplic

Re: Updated backup APIs for non-exclusive backups

2018-11-26 Thread Stephen Frost
Greetings, * David Steele (da...@pgmasters.net) wrote: > On 11/26/18 12:31 AM, Laurenz Albe wrote: > >If there is a crash during the backup procedure, the backup is bad. > >Doesn't matter during which part of the backup procedure it happens. > > Yes, but in this case with exclusive backups your c

Re: Updated backup APIs for non-exclusive backups

2018-11-26 Thread David Steele
On 11/26/18 12:31 AM, Laurenz Albe wrote: On Sun, 2018-11-25 at 16:04 -0500, Stephen Frost wrote: There isn’t any need to write the backup label before you restore the database, just as you write recovery.conf then. Granted. But it is pretty convenient, and writing it to the data directory rig

Re: Updated backup APIs for non-exclusive backups

2018-11-26 Thread Magnus Hagander
On Mon, Nov 26, 2018 at 6:44 AM Laurenz Albe wrote: > On Sun, 2018-11-25 at 22:01 +0100, Magnus Hagander wrote: > [about managing backups from pre- and post-file-system-backup scrips] > > I agree with your point that it's not an uncommon thing to need. If a > good solution > > for it can be propo

Re: Updated backup APIs for non-exclusive backups

2018-11-25 Thread Laurenz Albe
On Sun, 2018-11-25 at 22:01 +0100, Magnus Hagander wrote: [about managing backups from pre- and post-file-system-backup scrips] > I agree with your point that it's not an uncommon thing to need. If a good > solution > for it can be proposed that requires the exclusive backup interface, then I > w

Re: Updated backup APIs for non-exclusive backups

2018-11-25 Thread Laurenz Albe
On Sun, 2018-11-25 at 16:04 -0500, Stephen Frost wrote: > > > There isn’t any need to write the backup label before you restore the > > > database, > > > just as you write recovery.conf then. > > > > Granted. > > But it is pretty convenient, and writing it to the data directory right away > > is

Re: Updated backup APIs for non-exclusive backups

2018-11-25 Thread Stephen Frost
Greetings, On Sun, Nov 25, 2018 at 15:45 Laurenz Albe wrote: > Stephen Frost wrote: > > > > On restore, you're > > > > going to need to create a recovery.conf (at least in released > versions) > > > > which provides a restore command (needed even in HEAD today) to get > the > > > > old WAL, so h

Re: Updated backup APIs for non-exclusive backups

2018-11-25 Thread Magnus Hagander
On Sun, Nov 25, 2018 at 9:45 PM Laurenz Albe wrote: > Stephen Frost wrote: > > > > Lastly, if you really want, you can extract out the data from > > > > pg_stop_backup in whatever your post-backup script is. > > > > > > Come on, now. > > > You usually use backup techniques like that because you c

Re: Updated backup APIs for non-exclusive backups

2018-11-25 Thread Laurenz Albe
Stephen Frost wrote: > > > Seeing it often doesn't make it a good solution. Running just > > > pre-backup and post-backup scripts and copying the filesystem isn't > > > enough to perform an online PostgreSQL backup- the WAL needs to be > > > collected as well, and you need to make sure that you h

Re: Updated backup APIs for non-exclusive backups

2018-11-25 Thread Stephen Frost
Greetings, On Sun, Nov 25, 2018 at 14:17 Laurenz Albe wrote: > On Sun, 2018-11-25 at 13:50 -0500, Stephen Frost wrote: > > I don't see any compelling argument for trying to do something half-way > > any more today than I did two years ago when this was being discussed. > > That may well be so.

Re: Updated backup APIs for non-exclusive backups

2018-11-25 Thread Laurenz Albe
On Sun, 2018-11-25 at 13:50 -0500, Stephen Frost wrote: > I don't see any compelling argument for trying to do something half-way > any more today than I did two years ago when this was being discussed. That may well be so. It may be better to make users unhappy than to make them very unhappy...

Re: Updated backup APIs for non-exclusive backups

2018-11-25 Thread Stephen Frost
Greetings, * Laurenz Albe (laurenz.a...@cybertec.at) wrote: > On Sun, 2016-04-24 at 11:49 -0400, Stephen Frost wrote: > > * Magnus Hagander (mag...@hagander.net) wrote: > > > On Sun, Apr 24, 2016 at 5:37 AM, Bruce Momjian wrote: > > > > On Fri, Apr 22, 2016 at 11:53:46AM -0400, Robert Haas wrote:

Re: Updated backup APIs for non-exclusive backups

2018-11-25 Thread Laurenz Albe
I'm a bit late to the party, but I only recently noticed that the exclusive backup API is deprecated. On Sun, 2016-04-24 at 11:49 -0400, Stephen Frost wrote: > * Magnus Hagander (mag...@hagander.net) wrote: > > On Sun, Apr 24, 2016 at 5:37 AM, Bruce Momjian wrote: > > > On Fri, Apr 22, 2016 at 11