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 D028A3A4280 for ; Fri, 28 Jan 2005 05:04:47 +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 00117-03 for ; Fri, 28 Jan 2005 05:04:32 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id AE0D13A61E0 for ; Fri, 28 Jan 2005 05:04:31 +0000 (GMT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.1/8.13.1) with ESMTP id j0S54QeL002048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 Jan 2005 22:04:28 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.1/8.13.1) with ESMTP id j0S54P77083765; Thu, 27 Jan 2005 22:04:26 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.1/8.13.1/Submit) id j0S54FX3083696; Thu, 27 Jan 2005 22:04:15 -0700 (MST) (envelope-from mfuhr) Date: Thu, 27 Jan 2005 22:04:15 -0700 From: Michael Fuhr To: Inpreet Singh Cc: pgsql-admin@postgresql.org Subject: Re: Restore postgres database problem Message-ID: <20050128050415.GA70681@winnie.fuhr.org> References: <006d01c5029a$38fb4e60$3c67a8c0@netsity.com> <20050125213847.GA95908@winnie.fuhr.org> <00bc01c50431$c3997590$3c67a8c0@netsity.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00bc01c50431$c3997590$3c67a8c0@netsity.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/284 X-Sequence-Number: 16143 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/