Moving a PostgreSQL database from one server to another
Andre Speelmans
andre at as.no-ip.com
Fri Jan 14 08:21:19 UTC 2005
Rodolfo J. Paiz wrote:
> 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
I personally use:
$ pg_dump -- format c --no-owner database_name > file.out
On the other server I create the database if necessary:
$ createdb database_name
Followed by:
pg_restore --dbname database_name --no-owner file.out
This way has worked as a charm for me every time I used it.
--
Regards,
André
More information about the fedora-list
mailing list