Re: How to recover from compressed wal archieve in windows - Mailing list pgsql-general

From Adrian Klaver
Subject Re: How to recover from compressed wal archieve in windows
Date
Msg-id 90ef92fc-7827-f77a-2544-0c086b65666b@aklaver.com
Whole thread Raw
In response to Re: How to recover from compressed wal archieve in windows  (Paul Förster <paul.foerster@gmail.com>)
Responses Re: How to recover from compressed wal archieve in windows  (Paul Förster <paul.foerster@gmail.com>)
List pgsql-general
On 5/20/20 11:43 AM, Paul Förster wrote:
> Hi Andrus, hi Adrian,
> 
> see:
> 
> 25.3.6.2. Compressed Archive Logs
> https://www.postgresql.org/docs/12/continuous-archiving.html#BACKUP-TIPS
> 
> Hope this helps in dealing with compressed WAL files.

Yeah, the issue would be getting a version of gunzip that works on 
Windows. In the past I have had luck with:

https://www.7-zip.org/

Not sure how well it works with redirects/pipes.

> 
> Cheers,
> Paul
> 
> 
>> On 20. May, 2020, at 20:36, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>>
>> On 5/20/20 8:08 AM, Andrus wrote:
>>> In windows 10
>>> pg_receivewal --directory="d:\wallog" --verbose --compress=9
>>> is used to archieve WAL.
>>> This creates .gz files
>>> For restore
>>> restore_command='copy "D:\\wallog\\%f" "%p"'
>>
>> I'm guessing:
>>
>> restore_command='copy "D:\\wallog\\%f.gz" "%p"'
>>
>> will get you the file.
>>
>> The next problem is that I'm pretty sure a WAL file with *.gz extension will not be able to be processed directly by
theserver. So you are going to have to uncompress it at some point before it gets restored.
 
>>
>>
>>> is used.
>>> Restore shows "file not found" errors in console. Thi sis probably because %f argument is WAL file name without
extension.
>>> How to use compressed WAL files for WAL archieve and restore in windows ?
>>> Andrus.
>>
>>
>> -- 
>> Adrian Klaver
>> adrian.klaver@aklaver.com
>>
>>
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Stephen Frost
Date:
Subject: Re: SET ROLE and search_path
Next
From: Adrian Klaver
Date:
Subject: Re: How to recover from compressed wal archieve in windows