Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PostgreSQL dump problem

Status
Not open for further replies.

durumdara

IS-IT--Management
Dec 9, 2005
1
HU
Hi !

We have an old web service with a pgsql database (in Suse Linux). This database created by another programmer who no accessible now.

We want to dump this database to get data from it. But I have no passwords.

I do many things, but I cannot create dump from this database.
I know the name of database (inventory), and from zope I see this connection parameters: "dbname=inventory users=zope". And from zope that is working good.

When I try to make pg_dump:

pg_dump -s -v -U zope -W inventory >/invdump

it prompt for pwd, and I get auth. error.

When I try to create dump with def. user:
pg_dump -s -v -W inventory >/invdump

It is show error that "root user doesn't exists".

So: how to I dump this database ? Or how to I transfer it to a Windows machine to make dump on it ?

Is anybody have a solution ?

Thanks for advance: dd


 
try using postgres user
if not workig
pg_dump -s -v -U postgres inventory >/invdump

but if you use -s you will not get the data, only the structure

also if postgres is not allowed too see the pg_hba.conf file there are different access types and restrictions

use psql < invdump on the machine you want to restore it

if there are large objects in the database you have to use

pg_dump -Ft -b -U postgres inventory > inventory.tar

and then on the machine you want to recover you have to use
createdb inventory
pg_restore -d inventory inventory.tar
(root does not exist as user in the Database!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top