Using bzip with pg_dump

To dump data from a table:

pg_dump -hlocalhost -Upostgres -a -t table database|bzip2 > tabledata.bz2

To restore:

bzip2 -c -d tabledata.bz2 | psql -hlocalhost -Upostgres database


postgres

26 Words

2010-08-07 14:56 +0000