PostgreSQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesPostgreSQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old April 15th, 2008, 04:08 AM
bilboo969 bilboo969 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 2 bilboo969 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 49 sec
Reputation Power: 0
Extract current database structure

Hi all,

am new here and PostgreSQL is completely new land for me! So pleas be patient.

We have an external development team building a web application base on python and PostgreSQL on a centos box for a current project.

I was wondering if there is a way - preferably without pgdmin - to extract the current database structure / even convert it into and access format or so if you do not have a username / password for the database.

So to see all tables, files and relation ships.

I have full root access to the box!

Hope someone can help me out here please
Tnx a mill

Reply With Quote
  #2  
Old April 15th, 2008, 04:41 AM
shammat shammat is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2003
Location: Munich, Bavaria
Posts: 971 shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 44 m 25 sec
Reputation Power: 57
So you want to get the database objects from a database to which you cannot connect? No that's not possible

Reply With Quote
  #3  
Old April 15th, 2008, 08:06 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,711 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 6 Days 4 h 53 m 59 sec
Reputation Power: 259
You can import the whole information schema to MsAccess and then distribute that.
Of course a proper reverse engineering of the database into a Powerdesigner or ErWin file would be better IMHO

Reply With Quote
  #4  
Old April 23rd, 2008, 08:14 AM
bilboo969 bilboo969 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 2 bilboo969 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 49 sec
Reputation Power: 0
Hi all,

Tnx so much for ur replies.

I think I manged to get access to the database from the root user with psql -U postgres

if I then do a \l I see a list of existing databases and their owners

I also can connect to any database with \c and then \d gives me a list of tables, indexes, sequences and views!



Just wanted to make sure now that I am doing the right thing: want to dump the databases.

pg_dumpall -U postgres | gzip -c > /mnt/share/<name>.gz

or for each individual database

pg_dump -U postgres <databasename> | gzip -c > /mnt/share/<name>.gz


Will that dump all information information from all databases?

Then I also want to do a complete system dump - not sure if I should ask this here or open another post in a different forum but I see postgres .

For the complete system dump I use the following command from / :

tar lcf - . | gzip -c > /data/completesysdump220420081300-1.tar.gz

I get then a couple of ignored messages - is that something to get worry about?

tar: Semantics of -l option will change in the future releases.
tar: Please use --one-file-system option instead.
tar: ./tmp/.font-unix/fs7100: socket ignored
tar: ./tmp/.s.PGSQL.5432: socket ignored
tar: ./home/mdb_manager/nohup.out: file changed as we read it
tar: ./var/run/setrans/.setrans-unix: socket ignored
tar: ./var/run/audit_events: socket ignored
tar: ./var/run/avahi-daemon/socket: socket ignored
tar: ./var/run/sdp: socket ignored
tar: ./var/run/acpid.socket: socket ignored
tar: ./var/run/dbus/system_bus_socket: socket ignored
tar: ./var/run/cups/cups.sock: socket ignored
tar: ./var/run/setroubleshoot/setroubleshoot_server: socket ignored
tar: ./var/run/pcscd.comm: socket ignored

Tnx a mill again in advance for help / suggestions

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesPostgreSQL Help > Extract current database structure


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway