pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Checkpoint Location Format
5+ messages / 3 participants
[nested] [flat]

* Checkpoint Location Format
@ 2006-11-07 13:12 Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
  2006-11-09 07:02 ` Re: Checkpoint Location Format Jim C. Nasby <jim@nasby.net>
  2006-11-14 22:14 ` Re: Checkpoint Location Format Simon Riggs <simon@2ndquadrant.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Andy Shellam (Mailing Lists) @ 2006-11-07 13:12 UTC (permalink / raw)
  To: pgsql-admin

Hi,

I'm writing an automated file-system level backup application for use 
with WAL archiving, that will issue the pg_start_backup call, tar and 
gzip the cluster data directory, issue the pg_stop_backup call, and 
remove all previous un-needed WAL files from the archive.

I need to write a regular expression that will search for the WAL 
filename and checkpoint location from the backup_label file, and just 
want to clarify that the checkpoint location will always be of the 
format: X/XXXXXX - where X is one of 0-9, A-F?

And then the WAL .backup file that is generated in the archive, has a 
filename of the form:

<WAL_FILE>.00XXXXXX.backup

where <WAL_FILE> is the name of the "STARTING WAL LOCATION" directive in 
the backup_label file, and XXXXXX is the last 6 digits of the checkpoint 
(after the / )?

Thanks,

Andy.



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Checkpoint Location Format
  2006-11-07 13:12 Checkpoint Location Format Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
@ 2006-11-09 07:02 ` Jim C. Nasby <jim@nasby.net>
  2006-11-09 09:53   ` Re: Checkpoint Location Format Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
  1 sibling, 1 reply; 5+ messages in thread

From: Jim C. Nasby @ 2006-11-09 07:02 UTC (permalink / raw)
  To: Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>; +Cc: pgsql-admin

On Tue, Nov 07, 2006 at 01:12:53PM +0000, Andy Shellam (Mailing Lists) wrote:
> Hi,
> 
> I'm writing an automated file-system level backup application for use 
> with WAL archiving, that will issue the pg_start_backup call, tar and 
> gzip the cluster data directory, issue the pg_stop_backup call, and 
> remove all previous un-needed WAL files from the archive.
> 
> I need to write a regular expression that will search for the WAL 
> filename and checkpoint location from the backup_label file, and just 
> want to clarify that the checkpoint location will always be of the 
> format: X/XXXXXX - where X is one of 0-9, A-F?
> 
> And then the WAL .backup file that is generated in the archive, has a 
> filename of the form:
> 
> <WAL_FILE>.00XXXXXX.backup
> 
> where <WAL_FILE> is the name of the "STARTING WAL LOCATION" directive in 
> the backup_label file, and XXXXXX is the last 6 digits of the checkpoint 
> (after the / )?

I don't know the answer, but since no one's replied I suggest looking in
the code. Looking at the source of pg_start_backup would probably be a
good start, though I'm guessing the real answer is somewhere in the
backend.
-- 
Jim Nasby                                            jim@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Checkpoint Location Format
  2006-11-07 13:12 Checkpoint Location Format Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
  2006-11-09 07:02 ` Re: Checkpoint Location Format Jim C. Nasby <jim@nasby.net>
@ 2006-11-09 09:53   ` Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
  0 siblings, 0 replies; 5+ messages in thread

From: Andy Shellam (Mailing Lists) @ 2006-11-09 09:53 UTC (permalink / raw)
  To: Jim C. Nasby <jim@nasby.net>; +Cc: pgsql-admin

Hi Jim,

Tom did answer actually!  (Although it was first thing in the morning 
and he hadn't had any caffeine so he may have forgot to copy the list in 
;) )
I forget what he said the format was now, and I haven't got his e-mail, 
but I've just done a regex to match one or more characters before and 
after the "/", which works.

Andy.

Jim C. Nasby wrote:
> On Tue, Nov 07, 2006 at 01:12:53PM +0000, Andy Shellam (Mailing Lists) wrote:
>   
>> Hi,
>>
>> I'm writing an automated file-system level backup application for use 
>> with WAL archiving, that will issue the pg_start_backup call, tar and 
>> gzip the cluster data directory, issue the pg_stop_backup call, and 
>> remove all previous un-needed WAL files from the archive.
>>
>> I need to write a regular expression that will search for the WAL 
>> filename and checkpoint location from the backup_label file, and just 
>> want to clarify that the checkpoint location will always be of the 
>> format: X/XXXXXX - where X is one of 0-9, A-F?
>>
>> And then the WAL .backup file that is generated in the archive, has a 
>> filename of the form:
>>
>> <WAL_FILE>.00XXXXXX.backup
>>
>> where <WAL_FILE> is the name of the "STARTING WAL LOCATION" directive in 
>> the backup_label file, and XXXXXX is the last 6 digits of the checkpoint 
>> (after the / )?
>>     
>
> I don't know the answer, but since no one's replied I suggest looking in
> the code. Looking at the source of pg_start_backup would probably be a
> good start, though I'm guessing the real answer is somewhere in the
> backend.
>   




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Checkpoint Location Format
  2006-11-07 13:12 Checkpoint Location Format Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
@ 2006-11-14 22:14 ` Simon Riggs <simon@2ndquadrant.com>
  2006-11-15 16:08   ` Re: Checkpoint Location Format Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
  1 sibling, 1 reply; 5+ messages in thread

From: Simon Riggs @ 2006-11-14 22:14 UTC (permalink / raw)
  To: Andy Shellam \(Mailing Lists\) <andy.shellam-lists@mailnetwork.co.uk>; +Cc: pgsql-admin

On Tue, 2006-11-07 at 13:12 +0000, Andy Shellam (Mailing Lists) wrote:

> I'm writing an automated file-system level backup application for use 
> with WAL archiving, that will issue the pg_start_backup call, tar and 
> gzip the cluster data directory, issue the pg_stop_backup call, and 
> remove all previous un-needed WAL files from the archive.

Is this any help?

http://archives.postgresql.org/pgsql-patches/2006-05/msg00229.php

If so, I'll see about updating it so it can get backpatched to 8.0 and
8.1 also.

-- 
  Simon Riggs             
  EnterpriseDB   http://www.enterprisedb.com





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Checkpoint Location Format
  2006-11-07 13:12 Checkpoint Location Format Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
  2006-11-14 22:14 ` Re: Checkpoint Location Format Simon Riggs <simon@2ndquadrant.com>
@ 2006-11-15 16:08   ` Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
  0 siblings, 0 replies; 5+ messages in thread

From: Andy Shellam (Mailing Lists) @ 2006-11-15 16:08 UTC (permalink / raw)
  To: Simon Riggs <simon@2ndquadrant.com>; +Cc: pgsql-admin

Yup that sounds useful - would this be another column added to the 
pg_stop_backup called "wal_filename" or similar?
My script uses this name to find the date/time of the current ".backup" 
file and remove any files earlier than it (except obviously the one 
listed in the START WAL LOCATION).
I've yet to run a restore test, but the backup and automatic archive 
clearout is working nicely.

I'm not too worried about the SQL function to find the current WAL file, 
although I can see this could be useful too.

Thanks,

Andy.

Simon Riggs wrote:
> On Tue, 2006-11-07 at 13:12 +0000, Andy Shellam (Mailing Lists) wrote:
>
>   
>> I'm writing an automated file-system level backup application for use 
>> with WAL archiving, that will issue the pg_start_backup call, tar and 
>> gzip the cluster data directory, issue the pg_stop_backup call, and 
>> remove all previous un-needed WAL files from the archive.
>>     
>
> Is this any help?
>
> http://archives.postgresql.org/pgsql-patches/2006-05/msg00229.php
>
> If so, I'll see about updating it so it can get backpatched to 8.0 and
> 8.1 also.
>
>   


-- 
Andy Shellam
NetServe Support Team

the Mail Network
"an alternative in a standardised world"

p: +44 (0) 121 288 0832/0839
m: +44 (0) 7818 000834




^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2006-11-15 16:08 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-11-07 13:12 Checkpoint Location Format Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
2006-11-09 07:02 ` Jim C. Nasby <jim@nasby.net>
2006-11-09 09:53   ` Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
2006-11-14 22:14 ` Simon Riggs <simon@2ndquadrant.com>
2006-11-15 16:08   ` Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox