| From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> | 
|---|---|
| To: | Israel Brewster <israel(at)ravnalaska(dot)net> | 
| Cc: | "pgsql-general(at)postgresql(dot)org general" <pgsql-general(at)postgresql(dot)org> | 
| Subject: | Re: Backup "Best Practices" | 
| Date: | 2016-11-29 07:04:37 | 
| Message-ID: | CAMkU=1wOnboKATX9uT_=3EBJy0Xnr+W7x4nbuzpDEPd09c0Yww@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
On Mon, Nov 28, 2016 at 2:50 PM, Israel Brewster <israel(at)ravnalaska(dot)net>
wrote:
>
> - What is the "best" (or just a good) method of keeping the WAL archives
>> under control? Obviously when I do a new basebackup I can "cleanup" any old
>> files that said backup doesn't need,
>>
>
> You have said you might be interested in doing PITR. So you want to delay
> the cleanup so as to not compromise that ability.  You need to develop a
> policy on how far back you want to be able to do a PITR.
>
>
>
>> but how do I know what those are?
>>
>
> pg_archivecleanup -n /mnt/server/archiverdir 000000010000000000000010.
> 00000020.backup
>
>
> Ok, but where does that "000000010000000000000010.00000020.backup" come
> from? I mean, I can tell it's a WAL segment file name (plus a backup
> label), but I don't have anything like that in my WAL archives, even though
> I've run pg_basebackup a couple of times.
>
I get one file like that for every pg_basebackup I run.  Could your
archive_command be doing something to specifically short-circuit the
writing of those files?  Like testing the length of %p or %f?
> Do I have to call something to create that file? Some flag to
> pg_basebackup? At the moment I am running pg_basebackup such that it
> generates gziped tar files, if that makes a difference.
>
That is how I run it as well.  I don't think there is a flag to
pg_basebackup which even allows you to bypass the creation of those files.
You are looking in the WAL archive itself, correct?  Not somewhere in a
listing of the base.tar.gz file?
Cheers,
Jeff
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Kellerer | 2016-11-29 07:20:15 | Re: Backup "Best Practices" | 
| Previous Message | David G. Johnston | 2016-11-29 03:36:36 | Re: Wal files - Question | Postgres 9.2 |