Received: from moutvdomng1.kundenserver.de (moutvdomng1.kundenserver.de [212.227.126.181]) by postgresql.org (Postfix) with ESMTP id B9962476437 for ; Wed, 13 Mar 2002 13:51:14 -0500 (EST) Received: from [212.227.126.161] (helo=mrvdomng0.kundenserver.de) by moutvdomng1.kundenserver.de with esmtp (Exim 3.22 #2) id 16lDqA-00073Z-00 for pgsql-php@postgresql.org; Wed, 13 Mar 2002 19:51:10 +0100 Received: from pd9e5f235.dip0.t-ipconnect.de ([217.229.242.53] helo=finner.de) by mrvdomng0.kundenserver.de with smtp (Exim 3.22 #2) id 16lDqA-0006TZ-00 for pgsql-php@postgresql.org; Wed, 13 Mar 2002 19:51:10 +0100 Received: (qmail 11284 invoked from network); 13 Mar 2002 18:51:08 -0000 Received: from localhost (HELO lorien) (frank@127.0.0.1) by localhost with SMTP; 13 Mar 2002 18:51:08 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on Linux X-Priority: 3 (Normal) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 In-Reply-To: Date: Wed, 13 Mar 2002 19:51:07 +0100 (CET) From: Frank Finner To: arun kv Subject: Re: backup postgres database Cc: PGSQL X-Archive-Number: 200203/17 X-Sequence-Number: 986 Hi, pg_dump and psql are your friends. Dump the database with pg_dump, take the file and insert it into psql on the other machine. Details are covered in the manpages of these programs. Crude (without options): pg_dump your_db > your_db.dump psql < your_db.dump In the manpages you also find the options to dump with all create statements (e.g. CREATE DATABASE on the new machine) you might need. pg_dump is also THE solution to make backups. If you simply take the database files (especially, if the engine is running), you probably cannot use them either for backup or for transferring due to caching and other things. With pg_dump you even can transfer your database to another database engine (from PostgreSQL to Oracle for example), if you dump it with the option of complete insert statements. mfg frank finner On 13-Mar-02 arun kv sat down, thought for a long time and then wrote: > hello sir, > i have a postgresql database in one system and want to > transfer > the same to another system. i am not finding a way to transfer this > database from one system to another.if i transfer the file in > /var/lib/pgsql/libdatabase them it gives error.how shall i transfer > database. > another thing. how to take up backups of the database on the > system. > pls help me as i am new to postgresql > thanking you > Arun >=20 >=20 > ---------------------------(end of > broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster -- Frank Finner And now there is no turning back at all. (M. Moorcock, "Elric Of Melnibone")"