Re: archive_command - Mailing list pgsql-general

From Jun Wang
Subject Re: archive_command
Date
Msg-id AANLkTikV686VoUzPrxThvaSsvBTVerf-ArhV-sTGvZjp@mail.gmail.com
Whole thread Raw
In response to Re: archive_command  (Kenichiro Tanaka <ketanaka@ashisuto.co.jp>)
Responses Re: archive_command
Re: archive_command
List pgsql-general
The document recommends a command as below:

archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress || cp
-i %p /var/lib/pgsql/archive/%f < /dev/null'

How can this be done using windows batch? I tried the following
command, but it did not work:

archive_command = 'if not exist C:\\pgsql\\backup_in_progress || copy
%p C:\\pgsqlarchive\\%f'

The error is:

|| was unexpected at this time.

Thanks.

Jack

On Mon, May 31, 2010 at 5:40 PM, Kenichiro Tanaka
<ketanaka@ashisuto.co.jp> wrote:
> Hello
>
> In my environment,archive_command works fine with this command.
>
> archive_command = 'COPY %p C:\\Program
> Files\\PostgreSQL\\8.4\\data\\archive\\%f'
>
> (Is this what you want to know?)
>
>> Where can I find an example shell script and windows batch file for
>> archive_command for backup?
>>
>> Thanks.
>>
>> Jack
>>
>
>
>
> --
> 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: u235sentinel
Date:
Subject: postgres authentication against Windows Domain
Next
From: Serge Fonville
Date:
Subject: Re: archive_command