X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0D0F33A61CF for ; Fri, 28 Jan 2005 05:30:56 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 02104-08 for ; Fri, 28 Jan 2005 05:30:48 +0000 (GMT) Received: from mail.netsity.com (unknown [61.246.180.169]) by svr1.postgresql.org (Postfix) with ESMTP id A77DD3A61C0 for ; Fri, 28 Jan 2005 05:30:44 +0000 (GMT) Received: by mail.netsity.com with Internet Mail Service (5.5.2653.19) id ; Fri, 28 Jan 2005 11:00:54 +0530 Received: from ISINGH ([192.168.103.60]) by mail.netsity.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id D3CHCKA8; Fri, 28 Jan 2005 11:00:44 +0530 From: Inpreet Singh To: Michael Fuhr Cc: pgsql-admin@postgresql.org Message-ID: <004a01c504fa$8388e890$3c67a8c0@netsity.com> References: <006d01c5029a$38fb4e60$3c67a8c0@netsity.com> <20050125213847.GA95908@winnie.fuhr.org> <00bc01c50431$c3997590$3c67a8c0@netsity.com> <20050128050415.GA70681@winnie.fuhr.org> Subject: Re: Restore postgres database problem Date: Fri, 28 Jan 2005 11:00:44 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.382 tagged_above=0 required=5 tests=AWL, URIBL_SBL X-Spam-Level: X-Archive-Number: 200501/295 X-Sequence-Number: 16154 Yes it returning carriage returns. I am pasting below the output to the command u send to me *******Linux Prompt********************** [root@localhost inpreet]# head postgres.sql | cat -v --^M -- PostgreSQL database cluster dump^M --^M ^M \connect "template1"^M ^M --^M -- Users^M --^M ^M *************************************** Now what should I do? Regards Inpreet Singh ----- Original Message ----- From: "Michael Fuhr" To: "Inpreet Singh" Cc: Sent: Friday, January 28, 2005 10:34 AM Subject: Re: [ADMIN] Restore postgres database problem > On Thu, Jan 27, 2005 at 11:03:43AM +0530, Inpreet Singh wrote: > > > *Taken Dump :* /usr/bin/pg_dumpall > /home/inpreet/postgres.sql /*which > > was taken at client site*/ > > > > *Restoring Dump :* su - postgres /*This process I am doing at local site > > so thats why psql and dumpall are in diff directories*/ > > /usr/local/pgsql/bin/psql -d template1 < /home/inpreet/postgres.sql > > Is the local site running the same version of PostgreSQL or a later > version than the client site? If you try to restore into an earlier > version then you could have problems. > > How are you transferring the file from the client site to the local > site? Is it possible that the file was modified in transit? I > wonder if carriage returns have been added -- do you see ^M at the > ends of lines when you run the following command? > > head postgres.sql | cat -v > > > Sir I have some table values which are of type timestamp and those columns > > have values like > > ""2004-10-09 10:03:36.689993"". So is it possible that when I am restoring > > values this columns are creating all sort of trouble??? as timestamp field > > means date time at the time of insertion of record and I am trying to insert > > earlier date time. > > The "timestamp" type holds a date and time; PostgreSQL shouldn't > care about the value as long as it's syntactically correct (although > it's possible that a trigger or constraint might care). > > -- > Michael Fuhr > http://www.fuhr.org/~mfuhr/ >