pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Restore Problem
4+ messages / 4 participants
[nested] [flat]

* Restore Problem
@ 2003-10-20 15:06 Monica Robustelli <monica_robustelli@hotmail.com>
  2003-10-20 16:40 ` Re: Restore Problem Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Monica Robustelli @ 2003-10-20 15:06 UTC (permalink / raw)
  To: pgsql-admin

Hi all.....

I've a problem with a database restoring.
I've executed the dump command from a Linux 6.8 Red Hat version, Postgres 
7.1: this file executes a corrected restore under itself.
If I transfer the backup file to another Linux machine, Red Hat 9, Postgres 
7.3, I'v some problem during the database restoring. The error is:

ERROR:  copy: line 13, CopyReadAttribute: end of record marker corrupted
lost synchronization with server, resetting connection

The backup file is in the original format, no updating has been applied!

Thank in advanced...

Monica

_________________________________________________________________
Filtri antispamming e antivirus per la tua casella di posta 
http://www.msn.it/msn/hotmail




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Restore Problem
  2003-10-20 15:06 Restore Problem Monica Robustelli <monica_robustelli@hotmail.com>
@ 2003-10-20 16:40 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2003-10-20 16:40 UTC (permalink / raw)
  To: Monica Robustelli <monica_robustelli@hotmail.com>; +Cc: pgsql-admin

"Monica Robustelli" <monica_robustelli@hotmail.com> writes:
> If I transfer the backup file to another Linux machine, Red Hat 9, Postgres 
> 7.3, I'v some problem during the database restoring. The error is:

> ERROR:  copy: line 13, CopyReadAttribute: end of record marker corrupted

A likely bet is that you transferred the dump file in a manner that
converted Unix newlines (\n) to Windows newlines (\r\n).  COPY does not
tolerate that (in releases before 7.4 anyway).

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Restore Problem
@ 2003-10-20 18:38 Naomi Walker <nwalker@eldocomp.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Naomi Walker @ 2003-10-20 18:38 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

At 09:40 AM 10/20/2003, Tom Lane wrote:
>"Monica Robustelli" <monica_robustelli@hotmail.com> writes:
> > If I transfer the backup file to another Linux machine, Red Hat 9, 
> Postgres
> > 7.3, I'v some problem during the database restoring. The error is:
>
> > ERROR:  copy: line 13, CopyReadAttribute: end of record marker corrupted
>
>A likely bet is that you transferred the dump file in a manner that
>converted Unix newlines (\n) to Windows newlines (\r\n).  COPY does not
>tolerate that (in releases before 7.4 anyway).

What then is the proper method of upgrading from and old release?  I was 
planning on :

pg_dumpall > alldata.sql
psql -f alldata.sql template1 postgres >&err.out&


-- CONFIDENTIALITY NOTICE --

This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email, and delete the message. Thank you.



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Restore problem
@ 2010-07-15 22:05 Guy Wauters <guy@milieuinfo.be>
  0 siblings, 0 replies; 4+ messages in thread

From: Guy Wauters @ 2010-07-15 22:05 UTC (permalink / raw)
  To: pgsql-admin

Hi all,

Today, I tried to recover a postgresql cluster (pitr). I think it went  
fine (although I'm not sure), but I got some warnings afterwards...

2010-07-15 23:01:48 CEST [22907]: [2-1] user=,db= LOG:  starting  
archive recovery
2010-07-15 23:01:48 CEST [22907]: [3-1] user=,db= LOG:   
restore_command = '/opt/postgres/data/dov/data/pitr_ssh.sh %p %f'
2010-07-15 23:01:48 CEST [22907]: [4-1] user=,db= LOG:   
recovery_target_time = '2010-07-15 14:00:00+02'
/usr/bin/nsr/recover -d /zones/postgres-on-charlotte/fs/dov/data/ 
pg_xlog -a /zones/postgres-on-charlotte/root/opt/postgres/data/dov/ 
data/pg_xlog/00000001.history
6469:recover: /zones/postgres-on-charlotte/root/opt/postgres/data/dov/ 
data/pg_xlog/00000001.history not in index
67847:recover: Failed to recover files: Nothing to recover

/usr/bin/nsr/recover -d /zones/postgres-on-charlotte/fs/dov/data/ 
pg_xlog -a /zones/postgres-on-charlotte/root/opt/postgres/data/dov/ 
data/pg_xlog/00000001000000000000000C.00000020.backup
Recovering 1 file from /zones/postgres-on-charlotte/root/opt/postgres/ 
data/dov/data/pg_xlog/ into /zones/postgres-on-charlotte/fs/dov/data/ 
pg_xlog
Requesting 1 file(s), this may take a while...
./00000001000000000000000C.00000020.backup
Received 1 file(s) from NSR server `backup-master1'
Recover completion time: Thu Jul 15 23:01:59 2010
2010-07-15 23:01:59 CEST [22907]: [5-1] user=,db= LOG:  restored log  
file "00000001000000000000000C.00000020.backup" from archive
/usr/bin/nsr/recover -d /zones/postgres-on-charlotte/fs/dov/data/ 
pg_xlog -a /zones/postgres-on-charlotte/root/opt/postgres/data/dov/ 
data/pg_xlog/00000001000000000000000C
Recovering 1 file from /zones/postgres-on-charlotte/root/opt/postgres/ 
data/dov/data/pg_xlog/ into /zones/postgres-on-charlotte/fs/dov/data/ 
pg_xlog
Requesting 1 file(s), this may take a while...
Total estimated disk space needed for recover is 5 KB.
./00000001000000000000000C
Received 1 file(s) from NSR server `backup-master1'
Recover completion time: Thu Jul 15 23:02:02 2010
2010-07-15 23:02:02 CEST [22907]: [6-1] user=,db= LOG:  restored log  
file "00000001000000000000000C" from archive
2010-07-15 23:02:02 CEST [22907]: [7-1] user=,db= LOG:  automatic  
recovery in progress
2010-07-15 23:02:02 CEST [22907]: [8-1] user=,db= LOG:  redo starts at  
0/C000068, consistency will be reached at 0/C000088
2010-07-15 23:02:02 CEST [22907]: [9-1] user=,db= LOG:  consistent  
recovery state reached
/usr/bin/nsr/recover -d /zones/postgres-on-charlotte/fs/dov/data/ 
pg_xlog -a /zones/postgres-on-charlotte/root/opt/postgres/data/dov/ 
data/pg_xlog/00000001000000000000000D
Recovering 1 file from /zones/postgres-on-charlotte/root/opt/postgres/ 
data/dov/data/pg_xlog/ into /zones/postgres-on-charlotte/fs/dov/data/ 
pg_xlog
Requesting 1 file(s), this may take a while...
Total estimated disk space needed for recover is 7169 KB.
./00000001000000000000000D
Received 1 file(s) from NSR server `backup-master1'
Recover completion time: Thu Jul 15 23:02:10 2010
2010-07-15 23:02:10 CEST [22907]: [10-1] user=,db= LOG:  restored log  
file "00000001000000000000000D" from archive
2010-07-15 23:02:12 CEST [22907]: [11-1] user=,db= LOG:  recovery  
stopping before commit of transaction 1003, time 2010-07-15  
14:46:23.65437+02
2010-07-15 23:02:12 CEST [22907]: [12-1] user=,db= LOG:  redo done at  
0/D0010F0
/usr/bin/nsr/recover -d /zones/postgres-on-charlotte/fs/dov/data/ 
pg_xlog -a /zones/postgres-on-charlotte/root/opt/postgres/data/dov/ 
data/pg_xlog/00000002.history
6469:recover: /zones/postgres-on-charlotte/root/opt/postgres/data/dov/ 
data/pg_xlog/00000002.history not in index
67847:recover: Failed to recover files: Nothing to recover

2010-07-15 23:02:13 CEST [22907]: [13-1] user=,db= LOG:  selected new  
timeline ID: 2
/usr/bin/nsr/recover -d /zones/postgres-on-charlotte/fs/dov/data/ 
pg_xlog -a /zones/postgres-on-charlotte/root/opt/postgres/data/dov/ 
data/pg_xlog/00000001.history
6469:recover: /zones/postgres-on-charlotte/root/opt/postgres/data/dov/ 
data/pg_xlog/00000001.history not in index
67847:recover: Failed to recover files: Nothing to recover

2010-07-15 23:02:15 CEST [22907]: [14-1] user=,db= LOG:  archive  
recovery complete
2010-07-15 23:02:15 CEST [25436]: [1-1] user=,db= LOG:  checkpoint  
starting: end-of-recovery immediate wait
2010-07-15 23:02:15 CEST [25436]: [2-1] user=,db= LOG:  checkpoint  
complete: wrote 6 buffers (0.1%); 0 transaction log file(s) added, 0  
removed, 0 recycled; write=0.000 s, sync=0.009 s, total=0.180 s
2010-07-15 23:02:15 CEST [27805]: [1-1] user=,db= LOG:  autovacuum  
launcher started
2010-07-15 23:02:15 CEST [22886]: [5-1] user=,db= LOG:  database  
system is ready to accept connections


I think everything went fine till here. If not, please tell me what I  
did wrong.


 From here on, the log file is filled with messages like this:

3817:save: Using backup-master1 as server
/zones/postgres-on-charlotte/root/opt/postgres/data/dov/data/pg_xlog/ 
00000001000000000000000E: No such file or directory
2010-07-15 23:02:16:    BACKUP WAL: ERROR (1) - /usr/bin/nsr/save -b  
PGLOGS /zones/postgres-on-charlotte/root/opt/postgres/data/dov/data/ 
pg_xlog/00000001000000000000000E
2010-07-15 23:02:16 CEST [27810]: [1-1] user=,db= LOG:  archive  
command failed with exit code 1
2010-07-15 23:02:16 CEST [27810]: [2-1] user=,db= DETAIL:  The failed  
archive command was: /opt/postgres/dba/scripts/backup_WAL-135.sh  
pg_xlog/00000001000000000000000E
3817:save: Using backup-master1 as server
/zones/postgres-on-charlotte/root/opt/postgres/data/dov/data/pg_xlog/ 
00000001000000000000000E: No such file or directory
2010-07-15 23:02:18:    BACKUP WAL: ERROR (1) - /usr/bin/nsr/save -b  
PGLOGS /zones/postgres-on-charlotte/root/opt/postgres/data/dov/data/ 
pg_xlog/00000001000000000000000E
2010-07-15 23:02:18 CEST [27810]: [3-1] user=,db= LOG:  archive  
command failed with exit code 1
2010-07-15 23:02:18 CEST [27810]: [4-1] user=,db= DETAIL:  The failed  
archive command was: /opt/postgres/dba/scripts/backup_WAL-135.sh  
pg_xlog/00000001000000000000000E
3817:save: Using backup-master1 as server
/zones/postgres-on-charlotte/root/opt/postgres/data/dov/data/pg_xlog/ 
00000001000000000000000E: No such file or directory
2010-07-15 23:02:20:    BACKUP WAL: ERROR (1) - /usr/bin/nsr/save -b  
PGLOGS /zones/postgres-on-charlotte/root/opt/postgres/data/dov/data/ 
pg_xlog/00000001000000000000000E
2010-07-15 23:02:20 CEST [27810]: [5-1] user=,db= LOG:  archive  
command failed with exit code 1
2010-07-15 23:02:20 CEST [27810]: [6-1] user=,db= DETAIL:  The failed  
archive command was: /opt/postgres/dba/scripts/backup_WAL-135.sh  
pg_xlog/00000001000000000000000E
2010-07-15 23:02:20 CEST [27810]: [7-1] user=,db= WARNING:   
transaction log file "00000001000000000000000E" could not be archived:  
too many failures
3817:save: Using backup-master1 as server

Saving WAL file 00000001000000000000000E gives an error. The problem  
is that the WAL file does not exist in pg_xlog. Does someone know why?
The only WAL file I could find in pg_xlog is 00000002000000000000000D  
(timeline id is 2). The next thing I tried was  looking for  
00000001000000000000000E on our backup server. It seems that it didn't  
exist (or has never been backupped).
Finally I created an empty 00000001000000000000000E in pg_xlog and  
postgresql saved the fake WAL file, so I get rid off the warnings.

Did I do something wrong during the backup? Or with the recover?


Kind regards,

Guy

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2010-07-15 22:05 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-20 15:06 Restore Problem Monica Robustelli <monica_robustelli@hotmail.com>
2003-10-20 16:40 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-10-20 18:38 Re: Restore Problem Naomi Walker <nwalker@eldocomp.com>
2010-07-15 22:05 Restore problem Guy Wauters <guy@milieuinfo.be>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox