Don Baccus wrote:
>
> At 05:15 PM 11/12/99 +0100, Karel Zak - Zakkr wrote:
>
> >> pg_dump database | gzip >db.out.gz
>
> > Thank... :-))
>
> > But mysqldump --compress is very nice.
>
> Why add functionality for something that can be done so
> easily by piping the output of pg_dump?
>
> This is exactly the kind of coupling of tools that pipes
> were invented for.
Exactly !
Another version of the same is used when dumping databases
bigger than 2GB (or whatever the file system size limit is)
just do:
pg_dump database | gzip | split -b 1000000000 db.out.gz.
and restore it using
cat db.out.gz* | gunzip > psql
you could also do other fancy things with your dumps - send
them directly to tape storage in Japan or whatever ;)
If you need that functionality often enough then write a shell
script.
---------------
Hannu