Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 5F8441337B64 for ; Tue, 26 Oct 2010 19:22:07 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 78533-04 for ; Tue, 26 Oct 2010 22:22:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from xigix.ioguix.net (ioguix.net [217.70.191.109]) by mail.postgresql.org (Postfix) with ESMTP id 96FF4133798E for ; Tue, 26 Oct 2010 19:21:59 -0300 (ADT) Received: from [192.168.0.11] (vau75-10-88-164-23-161.fbx.proxad.net [88.164.23.161]) by xigix.ioguix.net (Postfix) with ESMTPSA id 2C24D31C58; Wed, 27 Oct 2010 00:21:58 +0200 (CEST) Message-ID: <4CC75485.4080901@free.fr> Date: Wed, 27 Oct 2010 00:21:57 +0200 From: "Jehan-Guillaume (ioguix) de Rorthais" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100914 Icedove/3.1.3 MIME-Version: 1.0 To: Martin Povolny CC: "pgsql-admin@postgresql.org" Subject: Re: large database: problems with pg_dump and pg_restore References: <68B59BEDCD36854AADBDF17E91B2937A01A7166E97@EXCHMAIL.staff.internode.com.au> In-Reply-To: <68B59BEDCD36854AADBDF17E91B2937A01A7166E97@EXCHMAIL.staff.internode.com.au> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201010/191 X-Sequence-Number: 35932 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Or even compress AND split it ! pg_dump -Fc dbname | split -b 1G - dump_dbname and restore: cat dump_dbname* | pg_restore -d dbname or cat dump_dbname* | pg_restore | psql dbname Le 26/10/2010 23:51, Samuel Stearns a écrit : > You can also try piping the dump through gzip and then restoring using cat: > > > > pg_dumpall | gzip > db.out-`date +\%Y\%m\%d\%H`.gz > > > > cat db.out-`date +\%Y\%m\%d\%H`.gz | gunzip | psql template1 > > > > Sam > > > > > > > > *From:* pgsql-admin-owner@postgresql.org > [mailto:pgsql-admin-owner@postgresql.org] *On Behalf Of *Martin Povolny > *Sent:* Tuesday, 26 October 2010 10:12 PM > *To:* pgsql-admin@postgresql.org > *Subject:* [ADMIN] large database: problems with pg_dump and pg_restore > > > > Hallo, > > > > I have some quite grave problems with dumping and restoring large > databases (>4GB of dump). > > I had 5 databases, 4 dumped ok, the 5th, the largest failed dumping: I > was unable to make a dump in the default 'tar' format. I got this message: > > > > pg_dump: [tar archiver] archive member too large for tar format > > > > I got over this issue by using the 'custom' format. > > > > Unfortunately later on I was only able to restore 3 of the 5 databases > -- any of the 2 dumps that would get over 4GB in the 'tar' format would > fail. > > > > /var/tmp# ls -l dumps/ > > total 16294020 > > -rw-r--r-- 1 root root 742611968 2010-10-16 20:36 archiv1.dump > > -rw-r--r-- 1 root root 317352448 2010-10-16 20:37 archiv2.dump > > -rw-r--r-- 1 root root 1137477632 2010-10-16 20:41 archiv3.dump > > -rw-r--r-- 1 root root 3712833536 2010- 10-16 20:57 archiv4.dump > > -rw-r--r-- 1 root root 8735429632 2010-10-16 21:35 archiv5.dump > > -rw-r--r-- 1 root root 1253325453 2010-10-16 22:59 bb.dump > > > > archiv1-4 went OK, archiv5 -- the largest in 'tar' format -- failed and > the 'bb.dump' which is in the 'custom' format, failed too. > > > > I got these messages: > > > > for the archiv5 in the 'tar' format: > > > > pg_restore: [tar archivář] nalezena poškozená tar hlavička v STEX > (předpokládáno 100, vypočteno 34044) pozice souboru 7750193152 > > > > sorry, it's in my native locale, but is says "found a corrupted tar > header in STEX (expected 100, calculated 34044) file position 7750193152 > > > > for the bb.dump in the 'custom' format: > > > > pg_restore: [vlastní archivář] unexpected end of file > > > > 'vlastní archiv ář' is again in my locale, it should be in English "own > archiver" > > > > Later I tried to utilize the -I and -i switches of pg_restore to restore > data that are in the archive behing the table that was not restored. But > got the same error message. > > > > The dump was created on postgresql-8.3 8.3.3-1~bpo40+1 from debian > backports. I was trying to restore on this version and later on using > postgresql-8.4 8.4.5-1~bpo50+1 from debian backports, finally I tried > 64bit version of postgresql-8.4 8.4.5-0ubuntu10.10. No change, still the > same error messages. > > > > I welcome any help and/or hints on this issue as I need to dump and > restore several large databases. > > > > Regards, > > > -- > Mgr. Martin Povolný, soLNet, s.r.o., > +420777714458, martin.povolny@solnet.cz > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzHVIAACgkQxWGfaAgowiL30ACglAXjKXTOZBsmrW5LFZzb8G83 XawAoIVc1UVkW4UQy5lK/jLNARxCb2QN =AR/f -----END PGP SIGNATURE-----