[TriLUG] Using gzip to backup postgres to tape

Bradford Powell bcpowell at email.unc.edu
Tue Nov 28 15:16:46 EST 2006


Coming into this discussion late... Is there any reason not to just use
the '-F c' option of pg_dump instead of '-F t'?

-- Bradford Powell
-- bradford_powell (at) unc.edu

On Mon, 2006-11-27 at 12:47 -0500, Andrew Perrin wrote:
> Folks,
> 
> I am trying to write a script to back up various postgresql databases to 
> tape. The tape drive works fine using plain tar (tar czf /dev/nst0 .) and 
> using uncompressed output from pg_dump (/usr/bin/pg_dump -F t leted > 
> /dev/nst0).  pg_dump works fine sending to a file compressed 
> (/usr/bin/pg_dump -F t leted | /bin/gzip -c > /tmp/leted.tgz).  However, 
> copying that to the tape dies with "Invalid argument" and produces a 
> corrupt tape entry. This is true whether I do:
> 
> /usr/bin/pg_dump -F t leted | /bin/gzip -c > /dev/nst0
> 
> or:
> 
> /usr/bin/pg_dump -F t leted | /bin/gzip -c > /tmp/leted.tgz
> cat /tmp/leted.tgz > /dev/nst0
> 
> My diagnostic genius tells me that this therefore has something to do 
> with the process of writing to the tape -- perhaps something about block 
> size? However, I'm at a loss with how to proceed. Any advice?





More information about the TriLUG mailing list