Re: pg_start/stop_backup naming conventions

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: mj0nes <matthew(dot)jones(at)ramtech(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_start/stop_backup naming conventions
Date: 2017-10-10 13:12:17
Message-ID: 20171010131217.GV4628@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

* mj0nes (matthew(dot)jones(at)ramtech(dot)co(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Frost 2017-10-10 13:14:56 Re: Permissions for Web App
Previous Message Stephen Frost 2017-10-10 13:08:48 Re: Using cp to back up a database?