Re: PITR on Win32 - Archive and Restore

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: markir(at)coretech(dot)co(dot)nz
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: PITR on Win32 - Archive and Restore
Date: 2004-08-08 00:18:46
Message-ID: 41157166.4040605@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32 pgsql-patches


Oh, yes, multiple quotes strings also cause problems :-(. You have no
idea how frustrating this was when I was writing initdb, and how hard it
was to find the problems.

The chdir solution might be best if we can do it, so that we only need
to quote the destination path.

cheers

andrew

markir(at)coretech(dot)co(dot)nz wrote:

>I tried out Andrew's suggestion, to no avail - none of the archive_commands
>below work:
>
>archive_command = 'copy "%p" "c:/databases/pgarchive/%f"'
>archive_command = 'copy \"%p\" \"c:/databases/pgarchive/%f\"'
>archive_command = 'copy \\"%p\\" \\"c:/databases/pgarchive/%f\\"' # desperation
>...
>
>A bit more investigation reveals that copy is bit selective about when it will
>accept quoted paths containing '/'.
>
>This works:
>
>cd c:\databases\pgdata\pg_xlog
>copy 00000001000000000000006A "c:/databases/pgarchive/00000001000000000000006A"
>
>This does not (unless your current directory is pg_xlog!):
>
>copy "c:/databases/pgdata/pg_xlog/00000001000000000000006A"
>"c:/databases/pgarchive/00000001000000000000006A"
>
>I guess this is not so bad if it is *just* 'copy' with this behaviour. I might
>try out winzip and see how I get on...
>
>regards (with some puzzlement)
>
>Mark
>
>
>Quoting Andrew Dunstan <andrew(at)dunslane(dot)net>:
>
>
>
>>Not if you pass it to the Windows shell via system() or popen() - then
>>forward slashed paths need to be quoted. It's only the libraries that
>>understand forward slashes as God intended.
>>
>>
>
>
>
>

In response to

Responses

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Bruce Momjian 2004-08-08 01:42:40 Re: PITR on Win32 - Archive and Restore
Previous Message markir 2004-08-07 23:25:59 Re: PITR on Win32 - Archive and Restore

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-08-08 00:24:22 Re: [PATCHES] UNICODE characters above 0x10000
Previous Message Oliver Jowett 2004-08-08 00:14:33 Re: [PATCHES] UNICODE characters above 0x10000