Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id B8C862E004A for ; Mon, 25 Feb 2008 00:18:26 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 14880-10 for ; Mon, 25 Feb 2008 00:18:23 -0400 (AST) X-Greylist: delayed 00:35:49.839293 by SQLgrey-1.7.5 Received: from weatherbeeta.com.au (unknown [218.214.212.154]) by postgresql.org (Postfix) with ESMTP id A376B2E004E for ; Mon, 25 Feb 2008 00:18:22 -0400 (AST) Received: (qmail 19127 invoked from network); 25 Feb 2008 03:20:46 -0000 X-NetworkBox-HamSign: 0101;OUT;wbeetaau1;4c0de2756ace5d9bafc64e611009955f; Received: from mail.weatherbeeta.com.au (10.20.0.2) by network-box.weatherbeeta.com.au with SMTP; 25 Feb 2008 03:20:46 -0000 Received: (qmail 10145 invoked by uid 1166); 25 Feb 2008 14:20:45 +1100 Received: from 172.20.0.155 by mail.weatherbeeta.com.au (envelope-from , uid 1165) with qmail-scanner-1.25-st-qms (clamdscan: 0.88.6/2315. perlscan: 1.25-st-qms. Clear:RC:1(172.20.0.155):. Processed in 1.482899 secs); 25 Feb 2008 03:20:45 -0000 X-Antivirus-mail.weatherbeeta.com.au-Mail-From: phillip.smith@weatherbeeta.com.au via mail.weatherbeeta.com.au X-Antivirus-mail.weatherbeeta.com.au: 1.25-st-qms (Clear:RC:1(172.20.0.155):. Processed in 1.482899 secs Process 10106) Received: from it-phil.weatherbeeta.com.au (HELO wbaus090) (172.20.0.155) by mail.weatherbeeta.com.au with SMTP; 25 Feb 2008 14:20:34 +1100 From: "Phillip Smith" To: Subject: Backup to Tape Incomplete Date: Mon, 25 Feb 2008 14:20:34 +1100 Organization: Weatherbeeta Pty Ptd Message-ID: <016d01c8775d$62382650$9b0014ac@wbaus090> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Scanned-By-wbeetaau1: Virus scan performed by network-box X-Scanned-By-wbeetaau1: Scanner file id is wbeetaau1-1203909646.353-19117-000 X-Scanned-By-wbeetaau1: No known viruses found in message (received+scanned in 0.02/0.03 secs) X-Scanned-By-wbeetaau1: Spam-Check-Result: No, hits=0 required=7 tests= autolearn=no version=2.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.989 tagged_above=0 required=5 tests=AWL=-0.930, MIME_QP_LONG_LINE=1.819, RDNS_NONE=0.1 X-Spam-Level: X-Archive-Number: 200802/305 X-Sequence-Number: 28379 PostgreSQL 8.2.4 RedHat ES4 I have a nightly cron job that is (supposed) to dump a specific database = to magnetic tape: /usr/local/bin/pg_dump dbname > /dev/st0 This runs, and doesn't throw any errors, but when I try to restore it = fails because the tape is incomplete: [postgres@stirling ~]$ cat /dev/st0 | tail =09 =09 -- -- Name: rewards_points; Type: ACL; Schema: public; Owner: dbname -- =09 REVOKE ALL ON TABLE rewards_points FROM PUBLIC; REVOKE ALL ON TABLE rewards_points FROM dbname; GRANT ALL ON TABLE rewards_points TO dbname; GRANT SELECT,INSERT,UPDATE ON TABLE rewards_points TO PUBL[postgres@stirling ~]$ As you can see, the "end of file" is half-way through a SQL statement, = and doesn't even have a new-line marker. The database is not too big for the tape - it's a DDS-3 tape drive = (12/24gb) and the database is not even 1gb: [postgres@stirling ~]$ pg_dump dbname > /tmp/dbname080225.sql [postgres@stirling ~]$ ls -lh /tmp/dbname080225.sql -rw-r--r-- 1 postgres root 957M Feb 25 13:42 /tmp/dbname080225.sql Is this a PostgreSQL issue or a tape drive issue? I can use tar to read = and write without any problems. Do I need to change the block size on the tape drive? [phillips@stirling ~]$ mt stat SCSI 2 tape drive: File number=3D0, block number=3D0, partition=3D0. Tape block size 512 bytes. Density code 0x25 (DDS-3). Soft error count since last status=3D0 General status bits on (41010000): BOT ONLINE IM_REP_EN THINK BEFORE YOU PRINT - Save paper if you don't really need to print this *******************Confidentiality and Privilege Notice******************* The material contained in this message is privileged and confidential to the addressee. If you are not the addressee indicated in this message or responsible for delivery of the message to such person, you may not copy or deliver this message to anyone, and you should destroy it and kindly notify the sender by reply email. Information in this message that does not relate to the official business of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta. Weatherbeeta, its employees, contractors or associates shall not be liable for direct, indirect or consequential loss arising from transmission of this message or any attachments e-mail.