Further to an earlier question..
pg_dumpall --inserts --clean -h $REMOTE -U admin | psql -U postgres
To extract a whole database from a remote server and to reload it into a
local DB but this produces tons of errors.
ERROR: role "admin" cannot be dropped because some objects depend on it
DETAIL: owner of database test1
owner of database test
7 objects in database test1
201 objects in database test
ERROR: role "admin" already exists
ERROR: current user cannot be dropped
ERROR: role "postgres" already exists
ERROR: role "sql-ledger" cannot be dropped because some objects depend on it
DETAIL: owner of database bean-demo
owner of database bean-cash
owner of database bean-41
Is there something I need to do RE the user I connect as?
Or should I do the dump to a file - transfer the file and then attempt
pgsql-admin by date
|Next:||From: Kevin Grittner||Date: 2009-04-10 13:42:43|
|Subject: Re: Finding out on exactly what I am stuck|
|Previous:||From: Kevin Bailey||Date: 2009-04-10 09:34:44|
|Subject: backing and restoring whole database server - how does this script