From: Martín Marqués <martin@bugs.unl.edu.ar>
To: PGSQL <pgsql-php@postgresql.org>
Subject: Re: backup postgres database
Date: Wed, 13 Mar 2002 19:03:59 -0300
Message-ID: <20020313220401.82428FCA2@bugs.unl.edu.ar> (raw)
In-Reply-To: <XFMail.020313195107.postgresql@finner.de>
References: <XFMail.020313195107.postgresql@finner.de>
On Mié 13 Mar 2002 15:51, you wrote:
> 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
This will almost always give an error (even though lots of docs have this
sintaxis). That's because you didn't tell psql which database to connect to,
so he'll try to connect to a database with the name of the user (in my case,
that would be martin, or postgres in the case of administration duties).
My 2 cents
--
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-----------------------------------------------------------------
Martín Marqués | mmarques@unl.edu.ar
Programador, Administrador, DBA | Centro de Telematica
Universidad Nacional
del Litoral
-----------------------------------------------------------------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: martin@bugs.unl.edu.ar
Subject: Re: backup postgres database
In-Reply-To: <20020313220401.82428FCA2@bugs.unl.edu.ar>
References: <XFMail.020313195107.postgresql@finner.de> <20020313220401.82428FCA2@bugs.unl.edu.ar>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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