[Box Backup] Re: boxbackup + pg_dump

James O'Gorman boxbackup@boxbackup.org
Tue, 9 Jun 2009 19:33:34 +0100


On 7 Jun 2009, at 14:39, Roy wrote:

> Anton Bogdanovitch wrote:
>> Sorry. There was a typo.
>>
>> 1) pg_dumpall > dump.sql
>> 2) pg_dumpall > dump.sql | gzip > dump.gz
>> _______________________________________________
>> boxbackup mailing list
>> boxbackup@boxbackup.org
>> http://lists.warhead.org.uk/mailman/listinfo/boxbackup
>>
>> !DSPAM:4a2b778b306301804284693!
>>
> Hi Anton,
>
> You shouldn't gzip it, because then Box Backup cannot efficiently  
> backup the file. Because it then needs to diff a binary file instead  
> of a text file.

It depends how you want to handle the dumps really. I have my  
PostgreSQL servers do a nightly dump with a timestamp in the dump name  
(e.g. pgdump_dbname_yyyy-mm-dd-HH:MM:SS). I actually do the dump in  
the postgres binary format anyway, which is compressed by default.

I like having a nightly backup of each database, so I'm not bothered  
about having diffs of the same SQL dump.

As Chris pointed out on the -dev list recently [1], too, another  
option is to use pg_start_backup() as a pre-backup command and just  
backup the actual database cluster rather than dumping out.

James

[1] http://lists.warhead.org.uk/pipermail/boxbackup-dev/2009-June/002457.html