Re: Moving a PostgreSQL database from one server to another

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday January 13, 2005 6:12 pm, Rodolfo J. Paiz wrote:
> While we're here, I thought the correct command would be this:
>
> $ pg_dump -ovFc -f flightlog.out flightlog
>
> This is because some of the tables do referential integrity to others.
> For example, when inserting the destination airport for a flight (in the
> flights table), it checks to see that this airport in fact exists in the
> airports table. Am I correct in assuming that this requires the "-o"
> parameter? And is there any other problem that might exist with this
> command incantation?
>
> Note that this is not the only command I've tried... it's just what my
> manpage reading says might be the command I really want to run. I've
> tested as well with simpler things like "pg_dump flightlog > f.out".

Unfortunately man pages a great references and lousy tutorials. ;)

Try the following and see if it helps... (at the bash prompt)

pg_dump -U rpaiz -cCW flightlog > flightlog.out

To restore you need to have the user and database (not tables) already 
configured in the other PGSQL server. Then you can perform...

psql -U rpaiz -d flightlog -f flightlog.out

HTH.

-- 
Brian Ashe - CTO
Dee-Web Software Services, LLC.
http://www.dee-web.com/


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux