Re: Export and import from one postgres server to another

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Export and import from one postgres server to another
Дата
Msg-id 4FC4C80A.8080808@gmail.com
обсуждение исходный текст
Ответ на Export and import from one postgres server to another  (Alexander Reichstadt <info@apfeltaste.net>)
Ответы Re: Export and import from one postgres server to another  (Alban Hertroys <haramrae@gmail.com>)
Список pgsql-general
On 05/28/2012 11:27 AM, Alexander Reichstadt wrote:
> Hi,
>
> I am trying to "simply" export my postgres database from one server and
then import it into another. I thought I could use PhpPgAdmin, but the
hints on the web don't seem to work. One said to simply get a dump from
one phpPgAdmin, the go to the other server, select the database, click
the SQL button and then select the dump file. When I do this the import
fails
because the dump file begins with a \connect statement. The escape char
doesn't
seem to go through the web frontend or something. But without the connect
statement it ends up telling me no database selected. Please, can someone
let me know how to do this?

 From the phpPgAdmin FAQ:
https://raw.github.com/phppgadmin/phppgadmin/master/FAQ
Questions on dumps
------------------

Q: Why can't I reload the SQL script I dumped in the SQL window?

A: The following limitations currently exist in SQL script execution:

    * Only uploaded SQL scripts can contain COPY commands and for
      this to work, you must have PHP 4.2 or higher.

    * 'psql' commands such as '\connect' will not work at all.

    * Multiline SQL statements will not work, eg:

        CREATE TABLE example (
            a INTEGER
        );

    * You cannot change the current database or current user during
      the execution of the script.

    We do intend to work on some of these limitations in the future, but
    some of them are Postgres restrictions and we recommend using the
    'psql' utility to restore your full SQL dumps.

>
> Thanks
> Alex


--
Adrian Klaver
adrian.klaver@gmail.com

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

Предыдущее
От: Samba
Дата:
Сообщение: Disable Streaming Replication without restarting either master or slave
Следующее
От: Thomas Reiss
Дата:
Сообщение: How to handle ALTER TABLE DROP CONSTRAINT, ADD CONSTRAINT USING INDEX with foreign keys