Archiving problem on Windows

Started by Christian Rengstlover 18 years ago13 messagesgeneral
Jump to latest
#1Christian Rengstl
Christian.Rengstl@klinik.uni-regensburg.de

Hi list,

a have a problem using the following archiving command on windows:
'copy %p C:\\Archive\\DBArchive\\%f'
The error message i get is saying that the file could not be copied
because of error code 1. The strange thing is that in the archive
directory there are files that were copied one or two weeks ago and
since then i have not change the command.

Thanks for any advice!

Christian Rengstl M.A.
Klinik und Poliklinik für Innere Medizin II
Kardiologie - Forschung
Universitätsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230

#2Christian Rengstl
Christian.Rengstl@klinik.uni-regensburg.de
In reply to: Christian Rengstl (#1)
Fwd: Re: Archiving problem on Windows

When I login as user postgres, I can copy the files without any
problem.
Here is the error message (translated as it appears in German in my log
files):

copy pg_xlog\myfile C:\Archive\DBArchive\myfile<< failed: error code

1

copy pg_xlog\myfile C:\Archive\DBArchive\myfile<< failed: error code

1

copy pg_xlog\myfile C:\Archive\DBArchive\myfile<< failed: error code

1
WARNING: transaction log file could not be archived: too many errors

Christian Rengstl M.A.
Klinik und Poliklinik für Innere Medizin II
Kardiologie - Forschung
Universitätsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230

On Mon, Dec 3, 2007 at 11:27 PM, in message

<475482CB.9090701@reynolds.com.au>,
Paul Lambert <paul.lambert@reynolds.com.au> wrote:

Christian Rengstl wrote:

Hi list,

a have a problem using the following archiving command on windows:
'copy %p C:\\Archive\\DBArchive\\%f'
The error message i get is saying that the file could not be copied
because of error code 1. The strange thing is that in the archive
directory there are files that were copied one or two weeks ago and
since then i have not change the command.

Thanks for any advice!

It would help to paste the actual error message, not your description

of

Show quoted text

the error message.

Have you checked that the postgres user has full control over the
DBArchive directory and that there is available space on the disk?

--
Paul Lambert
Database Administrator
AutoLedgers - A Reynolds & Reynolds Company

#3A. Kretschmer
andreas.kretschmer@schollglas.com
In reply to: Christian Rengstl (#2)
Re: Fwd: Re: Archiving problem on Windows

am Tue, dem 04.12.2007, um 11:31:41 +0100 mailte Christian Rengstl folgendes:

When I login as user postgres, I can copy the files without any
problem.
Here is the error message (translated as it appears in German in my log
files):

copy pg_xlog\myfile C:\Archive\DBArchive\myfile<< failed: error code

1

copy pg_xlog\myfile C:\Archive\DBArchive\myfile<< failed: error code

1

copy pg_xlog\myfile C:\Archive\DBArchive\myfile<< failed: error code

1
WARNING: transaction log file could not be archived: too many errors

2 questions:

1. really 'myfile', or is 'myfile' only a placeholder for the real
logfile?

2. please try to specify the full path for the source file, maybe the
copy-command can't found the file without the full path.

Hope that helps, and please no top-posting. (in german: TOFU)

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

#4Christian Rengstl
Christian.Rengstl@klinik.uni-regensburg.de
In reply to: A. Kretschmer (#3)
Re: Fwd: Re: Archiving problem on Windows

Christian Rengstl M.A.
Klinik und Poliklinik für Innere Medizin II
Kardiologie - Forschung
Universitätsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230

On Tue, Dec 4, 2007 at 11:44 AM, in message

<20071204104435.GE25044@a-kretschmer.de>, "A. Kretschmer"
<andreas.kretschmer@schollglas.com> wrote:

am Tue, dem 04.12.2007, um 11:31:41 +0100 mailte Christian Rengstl
folgendes:

When I login as user postgres, I can copy the files without any
problem.
Here is the error message (translated as it appears in German in my

log

files):

copy pg_xlog\myfile C:\Archive\DBArchive\myfile<< failed: error

code

1

copy pg_xlog\myfile C:\Archive\DBArchive\myfile<< failed: error

code

1

copy pg_xlog\myfile C:\Archive\DBArchive\myfile<< failed: error

code

1
WARNING: transaction log file could not be archived: too many

errors

2 questions:

1. really 'myfile', or is 'myfile' only a placeholder for the real
logfile?

2. please try to specify the full path for the source file, maybe

the

copy- command can't found the file without the full path.

Hope that helps, and please no top- posting. (in german: TOFU)

Andreas

1) myfile is just a placeholder, as I am currently not working on the
server directly and i can't copy the filename using vnc...
2) the path given, is the path postgresql obviously interprets my
archive_command, so i don't know how to specify it.

#5A. Kretschmer
andreas.kretschmer@schollglas.com
In reply to: Christian Rengstl (#1)
Re: Archiving problem on Windows

am Mon, dem 03.12.2007, um 12:29:39 +0100 mailte Christian Rengstl folgendes:

Hi list,

a have a problem using the following archiving command on windows:
'copy %p C:\\Archive\\DBArchive\\%f'

According the doc, the command should be:

archive_command = 'copy "%p" /mnt/server/archivedir/"%f"' # Windows

Perhaps missing "" around the parameters %p and %f, AND/OR wrong path for
the destination (\\ instead /), i'm not sure, i'm not familiar with PG
under Windows.

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

#6Christian Rengstl
Christian.Rengstl@klinik.uni-regensburg.de
In reply to: A. Kretschmer (#5)
Re: Archiving problem on Windows

Christian Rengstl M.A.
Klinik und Poliklinik für Innere Medizin II
Kardiologie - Forschung
Universitätsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230

On Tue, Dec 4, 2007 at 12:03 PM, in message

<20071204110331.GF25044@a-kretschmer.de>, "A. Kretschmer"
<andreas.kretschmer@schollglas.com> wrote:

am Mon, dem 03.12.2007, um 12:29:39 +0100 mailte Christian Rengstl
folgendes:

Hi list,

a have a problem using the following archiving command on windows:
'copy %p C:\\Archive\\DBArchive\\%f'

According the doc, the command should be:

archive_command = 'copy "%p" /mnt/server/archivedir/"%f"' # Windows

Perhaps missing "" around the parameters %p and %f, AND/OR wrong path

for

the destination (\\ instead /), i'm not sure, i'm not familiar with

PG

under Windows.

Andreas

I read that part of the docs, too, and changed it accordingly, but
without any success.

#7A. Kretschmer
andreas.kretschmer@schollglas.com
In reply to: Christian Rengstl (#6)
Re: Archiving problem on Windows

am Tue, dem 04.12.2007, um 12:05:41 +0100 mailte Christian Rengstl folgendes:

a have a problem using the following archiving command on windows:
'copy %p C:\\Archive\\DBArchive\\%f'

According the doc, the command should be:

archive_command = 'copy "%p" /mnt/server/archivedir/"%f"' # Windows

Perhaps missing "" around the parameters %p and %f, AND/OR wrong path

for

the destination (\\ instead /), i'm not sure, i'm not familiar with

PG

under Windows.

I read that part of the docs, too, and changed it accordingly, but
without any success.

The propper config-file? (compare with the output from the command
"show config_file;" within psql), reload/restart the server?

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

#8Christian Rengstl
Christian.Rengstl@klinik.uni-regensburg.de
In reply to: A. Kretschmer (#7)
Re: Archiving problem on Windows

Christian Rengstl M.A.
Klinik und Poliklinik für Innere Medizin II
Kardiologie - Forschung
Universitätsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230

On Tue, Dec 4, 2007 at 12:21 PM, in message

<20071204112151.GG25044@a-kretschmer.de>, "A. Kretschmer"
<andreas.kretschmer@schollglas.com> wrote:

am Tue, dem 04.12.2007, um 12:05:41 +0100 mailte Christian Rengstl
folgendes:

a have a problem using the following archiving command on

windows:

'copy %p C:\\Archive\\DBArchive\\%f'

According the doc, the command should be:

archive_command = 'copy "%p" /mnt/server/archivedir/"%f"' #

Windows

Perhaps missing "" around the parameters %p and %f, AND/OR wrong

path

for

the destination (\\ instead /), i'm not sure, i'm not familiar

with

PG

under Windows.

I read that part of the docs, too, and changed it accordingly, but
without any success.

The propper config- file? (compare with the output from the command
"show config_file;" within psql), reload/restart the server?

Andreas

show config_file points to the right one. I restarted the server after
every change. After including the quotation marks as in the docs, the
quotation marks also appeared in the command, so at least it shows that
the config file was read.

#9Paul Lambert
paul.lambert@reynolds.com.au
In reply to: Christian Rengstl (#8)
Re: Archiving problem on Windows

Christian Rengstl wrote:

show config_file points to the right one. I restarted the server after
every change. After including the quotation marks as in the docs, the
quotation marks also appeared in the command, so at least it shows that
the config file was read.

How about show archive_command;? Just to verify that it's reading in the
right thing.

e.g.
My postgresql.conf:
archive_command = 'copy "%p" E:\\PostgreSQL\\WAL_Archive\\%f'

From pgsql:
postgres=# show archive_command;
archive_command
----------------------------------------
copy "%p" E:\PostgreSQL\WAL_Archive\%f

Cheers,
Paul.

--
Paul Lambert
Database Administrator
AutoLedgers - A Reynolds & Reynolds Company

#10Christian Rengstl
Christian.Rengstl@klinik.uni-regensburg.de
In reply to: Paul Lambert (#9)
Re: Archiving problem on Windows

Christian Rengstl M.A.
Klinik und Poliklinik für Innere Medizin II
Kardiologie - Forschung
Universitätsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230

On Wed, Dec 5, 2007 at 2:47 AM, in message

<4756034B.8020208@reynolds.com.au>,
Paul Lambert <paul.lambert@reynolds.com.au> wrote:

Christian Rengstl wrote:

show config_file points to the right one. I restarted the server

after

every change. After including the quotation marks as in the docs,

the

quotation marks also appeared in the command, so at least it shows

that

the config file was read.

How about show archive_command;? Just to verify that it's reading in

the

right thing.

e.g.
My postgresql.conf:
archive_command = 'copy "%p" E:\\PostgreSQL\\WAL_Archive\\%f'

From pgsql:
postgres=# show archive_command;
archive_command
----------------------------------------
copy "%p" E:\PostgreSQL\WAL_Archive\%f

Cheers,
Paul.

--
Paul Lambert
Database Administrator
AutoLedgers - A Reynolds & Reynolds Company

---------------------------(end of

broadcast)---------------------------

TIP 5: don't forget to increase your free space map settings

The archive_command is 'copy %p C:\\Archive\\DBArchive\\%f',
nevertheless I changed it to your version, but without success.

#11Paul Lambert
paul.lambert@reynolds.com.au
In reply to: Christian Rengstl (#10)
Re: Archiving problem on Windows

Christian Rengstl wrote:

The archive_command is 'copy %p C:\\Archive\\DBArchive\\%f',
nevertheless I changed it to your version, but without success.

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

And what does pgsql show when you do a "show archive_command;"

--
Paul Lambert
Database Administrator
AutoLedgers - A Reynolds & Reynolds Company

#12Christian Rengstl
Christian.Rengstl@klinik.uni-regensburg.de
In reply to: Paul Lambert (#11)
Re: Archiving problem on Windows

Christian Rengstl M.A.
Klinik und Poliklinik für Innere Medizin II
Kardiologie - Forschung
Universitätsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230

On Wed, Dec 5, 2007 at 8:25 AM, in message

<4756527B.6040609@reynolds.com.au>,
Paul Lambert <paul.lambert@reynolds.com.au> wrote:

Christian Rengstl wrote:

The archive_command is 'copy %p C:\\Archive\\DBArchive\\%f',
nevertheless I changed it to your version, but without success.

---------------------------(end of

broadcast)---------------------------

TIP 5: don't forget to increase your free space map settings

And what does pgsql show when you do a "show archive_command;"

--
Paul Lambert
Database Administrator
AutoLedgers - A Reynolds & Reynolds Company

---------------------------(end of

broadcast)---------------------------

TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do

not

match

It shows: "copy "%p" F:\TransaktionsLogArchiv\%f" -> I changed the
directory to archive the files in to see if it would help, but it
doesn't.

#13Christian Rengstl
Christian.Rengstl@klinik.uni-regensburg.de
In reply to: Paul Lambert (#11)
Re: Archiving problem on Windows

Christian Rengstl M.A.
Klinik und Poliklinik für Innere Medizin II
Kardiologie - Forschung
Universitätsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230

On Wed, Dec 5, 2007 at 8:25 AM, in message

<4756527B.6040609@reynolds.com.au>,
Paul Lambert <paul.lambert@reynolds.com.au> wrote:

Christian Rengstl wrote:

The archive_command is 'copy %p C:\\Archive\\DBArchive\\%f',
nevertheless I changed it to your version, but without success.

---------------------------(end of

broadcast)---------------------------

TIP 5: don't forget to increase your free space map settings

And what does pgsql show when you do a "show archive_command;"

--
Paul Lambert
Database Administrator
AutoLedgers - A Reynolds & Reynolds Company

---------------------------(end of

broadcast)---------------------------

TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do

not

match

Now i did the following: I changed "copy" to "xcopy" then all of a
sudden I received the error message that a file could not be found. Then
I copied one existing file and changed the name so that it's in the
pg_xlog directory, but since then I do not receive any messages in the
log file or in the windows event logs and no file is copied either.