Re: How to increace nightly backup speed - Mailing list pgsql-general

From Glen Parker
Subject Re: How to increace nightly backup speed
Date
Msg-id 456B9028.7020901@nwlink.com
Whole thread Raw
In response to Re: How to increace nightly backup speed  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: How to increace nightly backup speed  (Ron Johnson <ron.l.johnson@cox.net>)
List pgsql-general
Jeff Davis wrote:
> On Mon, 2006-11-27 at 19:13 +0200, Andrus wrote:
>> I need to create nightly backups to separate computer over internet from 8.1
>> server
>>
>> I tried to run pg_dump to make backup using command
>>
>> "..\pg_dump\pg_dump.exe" -i -Z9 -b -v -f "C:\061127 mybackup.backup" -F c -h
>> 81.50.12.18 -U myuser -p 5431 mydb
>>
>> but this takes 4.5 hours to complete.
>>
>> How to increace backup speed ?


I agree to use online backups.  But, I bet the majority of your backup
time is spent compressing your data (-Z9).

The solution I'm currently using (both with online backups and pg_dump)
is to copy all the data to an alternate volume uncompressed, then
compress it (nice gzip -1).  This allows the backup itself to happen as
quickly as possible, and then the compression can run for awhile without
having a large IO impact on the main data volumes. I worry about how
long the initial copy/dump takes, but not so much after that.

-Glen

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: NULLs ;-)
Next
From: Michael Glaesemann
Date:
Subject: Re: IS it a good practice to use SERIAL as Primary Key?