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

From mj0nes
Subject [GENERAL] pg_start/stop_backup naming conventions
Date
Msg-id 1507566809343-0.post@n3.nabble.com
Whole thread Raw
Responses Re: [GENERAL] pg_start/stop_backup naming conventions  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: [GENERAL] pg_start/stop_backup naming conventions  (Stephen Frost <sfrost@snowman.net>)
List pgsql-general
Hi,

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./

I've since of course learnt that the file created is in some way related to
the WAL files referenced in the return from pg_start_backup - but it's not
really a transparent mapping from e.g. 1/F3000028 to
0000000100000001000000F3.00000028.backup. I appreciate the are telltale
similarities between the two, but to be sure of matching programmatically
I'd really rather know the naming convention. Why are there two fewer zeros
preceding the 28 in the value returned from pg_start_backup? What's the 28?
Why the "1/"? Can this pattern always be relied upon?

It might be easier if the backup file actually appeared locally, as the
documentation suggests, that way I could name the tar file accordingly. But
it doesn't, it gets shipped off to the remote server in the same way as WAL
files via the archive setup.

The documentation could be a bit more explicit around this.

Thanks for any pointers.



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Jeff Janes
Date:
Subject: Re: [GENERAL] Using cp to back up a database?
Next
From: Ron Johnson
Date:
Subject: Re: [GENERAL] Using cp to back up a database?