Thread: System dump, but not in the default format

System dump, but not in the default format

From
David Goodenough
Date:
I would like to do a dump of all the DBs in a postgres system in the manner
of pg_dumpall, but dumping the DBs out to individual files rather than one
big one, and using a binary dump to make individual table restores easier.

Can I do this with options to pg_dumpall (or some other command I have not
noticed), or do I need to take a copy and modify the copy to do what I need?

I am running a 7.2 system if that makes a difference.

Thanks in advance

David


Re: System dump, but not in the default format

From
Dave Smith
Date:
I would suggest using pg_dumpall only to dump the global postgres info
and then use pg_dump with the -Fc option for the databases .From that
you can use pg_restore for individual tables.


On Fri, 2003-03-28 at 08:24, David Goodenough wrote:
> I would like to do a dump of all the DBs in a postgres system in the manner
> of pg_dumpall, but dumping the DBs out to individual files rather than one
> big one, and using a binary dump to make individual table restores easier.
>
> Can I do this with options to pg_dumpall (or some other command I have not
> noticed), or do I need to take a copy and modify the copy to do what I need?
>
> I am running a 7.2 system if that makes a difference.
>
> Thanks in advance
>
> David
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly


Re: System dump, but not in the default format

From
Peter Eisentraut
Date:
David Goodenough writes:

> I would like to do a dump of all the DBs in a postgres system in the manner
> of pg_dumpall, but dumping the DBs out to individual files rather than one
> big one, and using a binary dump to make individual table restores easier.

for d in $(psql -At -c 'select datname from pg_database'); do pg_dump $d >$d.sql; done

--
Peter Eisentraut   peter_e@gmx.net