Re: pg_dump --compress error - Mailing list pgsql-general

From Alban Hertroys
Subject Re: pg_dump --compress error
Date
Msg-id 1E28CD68-6477-46F3-AA68-8AD0CCB729A4@solfertje.student.utwente.nl
Whole thread Raw
In response to pg_dump --compress error  (yasin malli <yasinmalli@gmail.com>)
Responses Re: pg_dump --compress error
List pgsql-general
On 31 Aug 2010, at 8:17, yasin malli wrote:

Don't reply to just me, include the list.

> if I took my dump file with 'pg_dump -Ft ' command, I would use 'pg_restore', but I take my dump file at plain-old
formatfor compressing data ( tar format dump hasn't compress feature ) 
> when I tried your suggestion, I take this error : pg_restore: [archiver] input file does not appear to be a valid
archive 

Ah right, most people use --compress in combination with the custom format (-Fc).

> I have little space on my device so I have to compress db files.
> For example; when I took dump_file with 'pg_dump -Ft'  dump_files size : 56K
>                                                            'pg_dump --compress=5'          : 4K

Try pg_dump -Fc --compress=5, I think you'll reach comparable sizes and you'll get much more flexibility to restore
yourdatabase. 
Shouldn't you be using level 9 btw, if you're worried about disk space?

> I can take a dump_file but I can't restore it. Is there any other way to restore compressed data ?

Didn't you read the man page for the --compress option? You can just pipe your dump through gunzip.

Alban Hertroys

--
Screwing up is an excellent way to attach something to the ceiling.


!DSPAM:737,4c7ca37210401517469623!



pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: pg_dump --compress error
Next
From: yasin malli
Date:
Subject: Re: pg_dump --compress error