Re: how to copy data between machines ? - Mailing list pgsql-novice

From Frank Bax
Subject Re: how to copy data between machines ?
Date
Msg-id 5.2.1.1.0.20050512162019.041fb440@pop6.sympatico.ca
Whole thread Raw
In response to how to copy data between machines ?  (D.C. <coughlandesmond@yahoo.fr>)
List pgsql-novice
At 04:05 PM 5/12/05, D.C. wrote:
>After searching for a while as to how to transfer data from machine to
>machine, I came across the 'pg_dump' and 'pg_restore' commands.
>
>On machine 'A', I did ..
>
>    /usr/local/pgsql/bin/pg_dump test -f /tmp/blah
>
>Then ...
>
>    pg_restore -d test /tmp/test
>
>The result is ...
>
>    pg_restore: [archiver] input file does not appear to be a valid archive
>
>What did I miss ?


You forgot to read the manpage for pg_dump:

        -F format

        --format=format
               t      Output a tar archive suitable for input into
                      pg_restore. Using this archive format allows
                      reordering  and/or  exclusion of schema ele-
                      ments at the time the database is  restored.
                      It  is  also possible to limit which data is
                      reloaded at restore time.


pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: how to copy data between machines ?
Next
From: D.C.
Date:
Subject: Re: how to copy data between machines ?