[TriLUG] Using gzip to backup postgres to tape
Andrew Perrin
clists at perrin.socsci.unc.edu
Mon Nov 27 12:47:21 EST 2006
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?
Thanks,
Andy
----------------------------------------------------------------------
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
More information about the TriLUG
mailing list