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

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

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:
  #1  
Old August 10th, 2012, 04:48 AM
jmuthuku jmuthuku is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 1 jmuthuku User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 50 sec
Reputation Power: 0
PG_DUMP vs PG_DUMPALL

Hi,
I have a postgres database with about 2500 schema and I am trying to back up the database. Since PG_DUMPALL takes a really long time to complete I am trying to use PG_DUMP to selectively dump subsets of schemas in parallel like the following:

Code:
pg_dump -U postgres cust_db -c -n 'cust_100*' > /backup/dump/cust_100.sql &
pg_dump -U postgres cust_db -c -n 'cust_200*' > /backup/dump/cust_200.sql &
..
..


This seems to work fine but the only concern I have is that the size of the file dumped by PG_DUMPALL is not equal to the sum of file sizes of all the individual files dumped by the various PG_DUMPs as shown above. The difference in the size is about 23MB.

As per the postgres documentation (below) PG_DUMPALL dumps additional objects that PG_DUMP does not. Is there a way to just dump the global objects so that I can restore it along with the restoration of the individual dump files shown above.

I'd appreciate if someone can provide some insights. Thanks.

Quote:
pg_dumpall is a utility for writing out ("dumping") all PostgreSQL databases of a cluster into one script file. The script file contains SQL commands that can be used as input to psql to restore the databases. It does this by calling pg_dump for each database in a cluster. pg_dumpall also dumps global objects that are common to all databases. (pg_dump does not save these objects.) This currently includes information about database users and groups, tablespaces, and properties such as access permissions that apply to databases as a whole.


- Jay

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesPostgreSQL Help > PG_DUMP vs PG_DUMPALL

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap