Lists: | pgsql-hackers-win32 |
---|
From: | "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> |
---|---|
To: | <markir(at)coretech(dot)co(dot)nz> |
Cc: | <pgsql-hackers-win32(at)postgresql(dot)org> |
Subject: | Re: PITR on Win32 - Archive and Restore |
Date: | 2004-08-09 12:12:29 |
Message-ID: | 6EE64EF3AB31D5448D0007DD34EEB34101AF27@Herge.rcsinc.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers-win32 |
> Good suggestion, got me thinking-
>
> Trying out stuff on the command line seems to show a general
> "unwillingness" to
> work with forward slashed names at all:
>
>
> C:\>cmd /c copy "c:/databases/pgdata/
> pg_xlog/000000010000000000000000"
> "c:/databases/pgarchive/000000010000000000000
> 000"
> The system cannot find the file specified.
> 0 file(s) copied.
>
> C:\>cmd /c "copy"
"c:/databases/pgdata/pg_xlog/000000010000000000000000"
> "c:/da
> tabases/pgarchive/000000010000000000000000"
> 'copy" "c:' is not recognized as an internal or external command,
> operable program or batch file.
>
> C:\>cmd /c "copy
"c:/databases/pgdata/pg_xlog/000000010000000000000000"
> "c:/dat
> abases/pgarchive/000000010000000000000000""
> The system cannot find the file specified.
> 0 file(s) copied.
>
> C:\>cmd /c ""copy"
"c:/databases/pgdata/pg_xlog/000000010000000000000000"
> "c:/d
> atabases/pgarchive/000000010000000000000000""
> '"copy"' is not recognized as an internal or external command,
> operable program or batch file.
>
> whereas of course :
>
> C:\>cmd /c copy c:\databases\pgdata\pg_xlog\000000010000000000000000
> c:\databa
> es\pgarchive\000000010000000000000000
> 1 file(s) copied.
>
>
> Quoting Christian Klemke <Christian(dot)Klemke(at)t-online(dot)de>:
>
> > "Copy" is an internal command of the command line shell in Windows.
> There is
> > no separate executable for it.
> > Try "cmd.exe /C copy ...." insteads (see "cmd /?" for further
options).
> >
> > Regards,
> > Christian.
I tried using copy for a while and gave up...it never got the slashes
right. I then replaced with cp that comes with mingw and that works
fine.
Merlin
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | pgsql-hackers-win32(at)postgresql(dot)org |
Subject: | Re: PITR on Win32 - Archive and Restore |
Date: | 2004-08-09 12:44:45 |
Message-ID: | 411771BD.3090108@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers-win32 |
Merlin Moncure wrote:
>
>
>I tried using copy for a while and gave up...it never got the slashes
>right. I then replaced with cp that comes with mingw and that works
>fine.
>
>
>
>
I don't think that's workable unless we intend to distribute it. Gary's
suggestion of using xcopy is probably a good one.
I will install MSys and friends on my new Windows machine and play
around to see what works, unless someone comes up with a tested solution
first.
cheers
andrew
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | pgsql-hackers-win32(at)postgresql(dot)org |
Subject: | Re: PITR on Win32 - Archive and Restore |
Date: | 2004-08-09 13:58:20 |
Message-ID: | 411782FC.7050302@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers-win32 |
I wrote:
>
> I will install MSys and friends on my new Windows machine and play
> around to see what works, unless someone comes up with a tested
> solution first.
>
>
Experimentation shows that xcopy is just as braindead about slashes as
copy is. But quoting the paths with backslashes worked, e.g.
system("xcopy \"c:\\foo bar\\baz\" \"c:\\tmp\" /y >nul");
So it appears that we need either to have the paths output with
system-dependant slashes, or, perhaps more flexibly, a new escape
sequences (%P?) which does system-dependent slashes - that would be a
small addition to src/backend/access/transam/xlog.c
cheers
andrew