From: | markir(at)coretech(dot)co(dot)nz |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, 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 03:24:13 |
Message-ID: | 1091935453.d918d7e4f0507@mail.coretech.co.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers-win32 pgsql-patches |
Using :
archive_command = '"copy "%p" "c:/databases/pgarchive/%f""'
I see this is the log:
LOG: archive command ""copy
"c:/databases/pgdata/pg_xlog/000000010000000000000000"
"c:/databases/pgarchive/000000010000000000000000""" failed: return code 1
The system cannot find the file specified.
Looks like it is confused about what the executable is...
regards
Mark
Quoting Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>:
> Andrew Dunstan wrote:
> >
> > 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
> > >...
>
> As I remember the fix was to use this:
>
> archive_command = '"copy "%p" "c:/databases/pgarchive/%f""'
>
> Yes, that is one extra quote at the start and end of the string. Would
> you try that?
>
> FYI, port.h has this:
>
> /*
> * Win32 needs double quotes at the beginning and end of system()
> * strings. If not, it gets confused with multiple quoted strings.
> * It also must use double-quotes around the executable name
> * and any files used for redirection. Other args can use single-quotes.
> *
> * See the "Notes" section about quotes at:
> * http://home.earthlink.net/~rlively/MANUALS/COMMANDS/C/CMD.HTM
> */
> #ifdef WIN32
> #define SYSTEMQUOTE "\""
> #else
> #define SYSTEMQUOTE ""
> #endif
>
>
> --
> Bruce Momjian | http://candle.pha.pa.us
> pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
> + If your life is a hard drive, | 13 Roberts Road
> + Christ can be your backup. | Newtown Square, Pennsylvania 19073
>
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-08-09 02:23:00 | Re: PITR on Win32 - Archive and Restore |
Previous Message | Bruce Momjian | 2004-08-08 01:42:40 | Re: PITR on Win32 - Archive and Restore |
From | Date | Subject | |
---|---|---|---|
Next Message | markir | 2004-08-08 03:28:51 | Re: Win32 tablespace |
Previous Message | Bruce Momjian | 2004-08-08 03:21:20 | Win32 fix for pg_dumpall |