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

Your rating: None Average: 4.8 (5 votes)