Re: [GENERAL] pg_start/stop_backup naming conventions - Mailing list pgsql-general

From Stephen Frost
Subject Re: [GENERAL] pg_start/stop_backup naming conventions
Date
Msg-id 20171010131217.GV4628@tamriel.snowman.net
Whole thread Raw
In response to [GENERAL] pg_start/stop_backup naming conventions  (mj0nes <matthew.jones@ramtech.co.uk>)
List pgsql-general
Greetings,

* mj0nes (matthew.jones@ramtech.co.uk) wrote:
> I'm just starting out on a rolling backup strategy and the naming convention
> has thrown me slightly for the WAL and "backup_label" files.
>
> What I want to do is pair up the backup label files with the associated tar
> ball of the data directory. When I first ran pg_start_backup('label'), I
> naively thought a file would be created named label. Maybe not that naive
> considering the documentation:
>
> /pg_start_backup creates a backup label file, *called backup_label*, in the
> cluster directory with information about your backup, including the start
> time and label string./

That's an interesting point, but not particularly relevent any more as
we've deprecated that approach to doing backups now because of issues
with the backup_label file and what happens if the system is restarted
during a backup.

> Thanks for any pointers.

Frankly, developing your own backup software for PG isn't trivial and
isn't something I'd recommend.  There's a number of good tools out there
which have been developed over years to work well to specifically
address PG backups and to do things correctly (such as making sure WAL
archiving is working and that WAL files are sync'd to disk before
telling PG that it's been copied).

Thanks!

Stephen

pgsql-general by date:

Previous
From: Stephen Frost
Date:
Subject: Re: [GENERAL] Using cp to back up a database?
Next
From: Stephen Frost
Date:
Subject: Re: [GENERAL] Permissions for Web App