[TriLUG] Using gzip to backup postgres to tape

Andrew Perrin clists at perrin.socsci.unc.edu
Wed Nov 29 08:44:11 EST 2006


Sadly, it's the same problem (I think):

perrin:~# su postgres -c '/usr/bin/pg_dump -F c leted > /dev/nst0'
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position 
-- ftell used
pg_dump: [custom archiver] could not close archive file: Invalid argument


----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin (at) unc.edu - http://perrin.socsci.unc.edu
Assistant Professor of Sociology; Book Review Editor, _Social Forces_
University of North Carolina - CB#3210, Chapel Hill, NC 27599-3210 USA
New Book: http://www.press.uchicago.edu/cgi-bin/hfs.cgi/00/178592.ctl



On Tue, 28 Nov 2006, Bradford Powell wrote:

> 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?
>
>
> -- 
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>



More information about the TriLUG mailing list