Re: Moving a PostgreSQL database from one server to another

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

 



On Thu, 2005-01-13 at 16:57 -0600, Les Mikesell wrote:
> pg_dump is the 'hot' database backup tool.  It should be used with
> the server running. If the destination is the same CPU type you
> can get away with copying the files under /var/lib/pgsql/ instead,
> in which case the server must be shut down.  You do have to tell
> it which database to dump and run it as a user with permission
> to connect, but there should be some kind of error message if
> it fails.
> 

I'm running it as the user "rpaiz" who owns the database, and this user
is consistently able to access the database via psql and a password.
pg_dump is returning nothing.

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".

Cheers,

-- 
Rodolfo J. Paiz <rpaiz@xxxxxxxxxxxxxx>


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

  Powered by Linux