pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedAbout compress in pg_dump
5+ messages / 4 participants
[nested] [flat]
* About compress in pg_dump
@ 2020-07-17 14:48 Edmundo Robles <edmundo@sw-argos.com>
0 siblings, 2 replies; 5+ messages in thread
From: Edmundo Robles @ 2020-07-17 14:48 UTC (permalink / raw)
To: pgsql-general
To backup a database I do:
nice -n +19 pg_dump -Fc database | nice -n +19 gzip --rsyncable -nc >
database.dump
If -Fc option is compressed by default I dont need gzip the backup,
but I need pass --rsyncable and -n options.
How can I pass gzip options to compress in pg_dump?
if not I will use :
nice -n +19 pg_dump -Fc -Z 0 database | nice -n +19 gzip --rsyncable -nc
> database.dump
but I dont want to do that. :)
Thanks for your help...
--
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: About compress in pg_dump
@ 2020-07-17 15:07 David G. Johnston <david.g.johnston@gmail.com>
parent: Edmundo Robles <edmundo@sw-argos.com>
1 sibling, 1 reply; 5+ messages in thread
From: David G. Johnston @ 2020-07-17 15:07 UTC (permalink / raw)
To: Edmundo Robles <edmundo@sw-argos.com>; +Cc: pgsql-general
On Fri, Jul 17, 2020 at 7:49 AM Edmundo Robles <edmundo@sw-argos.com> wrote:
> To backup a database I do:
> nice -n +19 pg_dump -Fc database | nice -n +19 gzip --rsyncable -nc
> > database.dump
>
> If -Fc option is compressed by default I dont need gzip the backup,
> but I need pass --rsyncable and -n options.
>
> How can I pass gzip options to compress in pg_dump?
>
pg_dump isn't using the gzip program, it's just performing compression per
the gzip compression specification, and doesn't provide those two features
to control it's processing (or any features beyond what's documented on the
pg_dump reference page).
David J.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: About compress in pg_dump
@ 2020-07-17 15:12 Diego <mrstephenamell@gmail.com>
parent: David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Diego @ 2020-07-17 15:12 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; Edmundo Robles <edmundo@sw-argos.com>; +Cc: pgsql-general
Yep, I transfer backups files all the time with -Fc and never the
problem was rsync
On 2020-07-17 12:07, David G. Johnston wrote:
> On Fri, Jul 17, 2020 at 7:49 AM Edmundo Robles <edmundo@sw-argos.com
> <mailto:edmundo@sw-argos.com>> wrote:
>
> To backup a database I do:
> nice -n +19 pg_dump -Fc database | nice -n +19 gzip --rsyncable
> -nc > database.dump
>
> If -Fc option is compressed by default I dont need gzip the
> backup, but I need pass --rsyncable and -n options.
>
> How can I pass gzip options to compress in pg_dump?
>
>
> pg_dump isn't using the gzip program, it's just performing compression
> per the gzip compression specification, and doesn't provide those two
> features to control it's processing (or any features beyond what's
> documented on the pg_dump reference page).
>
> David J.
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: About compress in pg_dump
@ 2020-07-17 20:18 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Edmundo Robles <edmundo@sw-argos.com>
1 sibling, 0 replies; 5+ messages in thread
From: Adrian Klaver @ 2020-07-17 20:18 UTC (permalink / raw)
To: Edmundo Robles <edmundo@sw-argos.com>; pgsql-general
On 7/17/20 7:48 AM, Edmundo Robles wrote:
> To backup a database I do:
> nice -n +19 pg_dump -Fc database | nice -n +19 gzip --rsyncable
> -nc > database.dump
>
> If -Fc option is compressed by default I dont need gzip the backup,
> but I need pass --rsyncable and -n options.
>
> How can I pass gzip options to compress in pg_dump?
>
> if not I will use :
> nice -n +19 pg_dump -Fc -Z 0 database | nice -n +19 gzip --rsyncable
> -nc > database.dump
> but I dont want to do that. :)
Do you need the custom format on the other end?
Or can you just use the plain format dump and pipe that to gzip with
appropriate options?
You will then need to use psql to do the restore though.
>
> Thanks for your help...
>
> --
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: About compress in pg_dump
@ 2020-07-17 20:21 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Diego <mrstephenamell@gmail.com>
0 siblings, 0 replies; 5+ messages in thread
From: Adrian Klaver @ 2020-07-17 20:21 UTC (permalink / raw)
To: Diego <mrstephenamell@gmail.com>; David G. Johnston <david.g.johnston@gmail.com>; Edmundo Robles <edmundo@sw-argos.com>; +Cc: pgsql-general
On 7/17/20 8:12 AM, Diego wrote:
> Yep, I transfer backups files all the time with -Fc and never the
> problem was rsync
Using --rsyncable with gzip really helps if you rsync the compressed
file to somewhere else it exists. It greatly reduces the amount of data
sent for files that a do not have a massive amount of changes between syncs.
>
> On 2020-07-17 12:07, David G. Johnston wrote:
>> On Fri, Jul 17, 2020 at 7:49 AM Edmundo Robles <edmundo@sw-argos.com
>> <mailto:edmundo@sw-argos.com>> wrote:
>>
>> To backup a database I do:
>> nice -n +19 pg_dump -Fc database | nice -n +19 gzip --rsyncable
>> -nc > database.dump
>>
>> If -Fc option is compressed by default I dont need gzip the
>> backup, but I need pass --rsyncable and -n options.
>>
>> How can I pass gzip options to compress in pg_dump?
>>
>>
>> pg_dump isn't using the gzip program, it's just performing compression
>> per the gzip compression specification, and doesn't provide those two
>> features to control it's processing (or any features beyond what's
>> documented on the pg_dump reference page).
>>
>> David J.
>>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2020-07-17 20:21 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17 14:48 About compress in pg_dump Edmundo Robles <edmundo@sw-argos.com>
2020-07-17 15:07 ` David G. Johnston <david.g.johnston@gmail.com>
2020-07-17 15:12 ` Diego <mrstephenamell@gmail.com>
2020-07-17 20:21 ` Adrian Klaver <adrian.klaver@aklaver.com>
2020-07-17 20:18 ` Adrian Klaver <adrian.klaver@aklaver.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox