Re: backup postgres database

Поиск
Список
Период
Сортировка
От Frank Finner
Тема Re: backup postgres database
Дата
Msg-id XFMail.020313195107.postgresql@finner.de
обсуждение исходный текст
Ответ на backup postgres database  (arun kv <arun@library.iisc.ernet.in>)
Ответы Re: backup postgres database  (Martín Marqués <martin@bugs.unl.edu.ar>)
Список pgsql-php
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
>
>
> ---------------------------(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")"

В списке pgsql-php по дате отправления:

Предыдущее
От: Jon Hassen
Дата:
Сообщение: Re: backup postgres database
Следующее
От: Martín Marqués
Дата:
Сообщение: Re: backup postgres database