| From: | Jun Wang <junw2000(at)gmail(dot)com> |
|---|---|
| To: | Kenichiro Tanaka <ketanaka(at)ashisuto(dot)co(dot)jp> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: archive_command |
| Date: | 2010-06-01 18:47:41 |
| Message-ID: | AANLkTikV686VoUzPrxThvaSsvBTVerf-ArhV-sTGvZjp@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)ashisuto(dot)co(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Serge Fonville | 2010-06-01 18:59:27 | Re: archive_command |
| Previous Message | u235sentinel | 2010-06-01 17:56:19 | postgres authentication against Windows Domain |