Re: [GENERAL] pg_dump --compress error
On 31 Aug 2010, at 6:44, yasin malli wrote: Hi everyone. I try this command ' pg_dump --compress=5 DBNAME ***.sql ' and ' psql -f ***.sql -d DBNAME ' but I take some error because of compression. how can restore compressed dump file without taking any error ? By using pg_restore instead of psql. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4c7c9a6510401193214009! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] pg_dump --compress error
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 format for 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 your database. 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! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] pg_dump --compress error
I tried it and it ran without any error but my table wasn't created so problem is going on. compress level isn't important because when I controlled it gave me same results ( 5 or 9 ) Unfortunately, only plain-old dump works correctly while restoring. if command contains any compress option, it won't work any suggestion ? -- Yasin MALLI System Software Development Engineer yasinma...@gmail.com , yasinma...@yahoo.com On Mon, Aug 30, 2010 at 11:38 PM, Alban Hertroys dal...@solfertje.student.utwente.nl wrote: 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 format for 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 your database. 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:1164,4c7ca36210403062783909!
Re: [GENERAL] pg_dump --compress error
yasin malli yasinma...@gmail.com writes: Unfortunately, only plain-old dump works correctly while restoring. if command contains any compress option, it won't work --compress is normally used as an adjunct to -Fc. I'm not real sure what you get if you specify it without that; maybe a compressed plain-text-script dump? If so, you'd have to pass it through gunzip and then to psql to do anything useful with it. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] pg_dump --compress error
On Tue, 2010-08-31 at 00:50 -0700, yasin malli wrote: I tried it and it ran without any error but my table wasn't created so problem is going on. compress level isn't important because when I controlled it gave me same results ( 5 or 9 ) Unfortunately, only plain-old dump works correctly while restoring. if command contains any compress option, it won't work Compress will not work in plaintext format for restore. You need to use -Fc and then pg_restore. Joshua D. Drake -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579 Consulting, Training, Support, Custom Development, Engineering http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] pg_dump --compress error
Excerpts from yasin malli's message of mar ago 31 00:44:36 -0400 2010: Hi everyone. I try this command ' pg_dump --compress=5 DBNAME ***.sql ' and ' psql -f ***.sql -d DBNAME ' but I take some error because of compression. how can restore compressed dump file without taking any error ? You can restore this with zcat ***.sql | psql -d DBNAME (or gunzip -c ***.sql if you don't have zcat) -- Álvaro Herrera alvhe...@commandprompt.com The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[GENERAL] pg_dump --compress error
Hi everyone. I try this command ' pg_dump --compress=5 DBNAME ***.sql ' and ' psql -f ***.sql -d DBNAME ' but I take some error because of compression. how can restore compressed dump file without taking any error ? thanks in advance -- Yasin MALLI Sistem ve Yazılım Geliştirme Mühendisi / System Software Development Engineer ya...@labristeknoloji.com , yasinma...@gmail.com , yasinma...@yahoo.com