Backup to Tape Incomplete

Поиск
Список
Период
Сортировка
От Phillip Smith
Тема Backup to Tape Incomplete
Дата
Msg-id 016d01c8775d$62382650$9b0014ac@wbaus090
обсуждение исходный текст
Ответы Re: Backup to Tape Incomplete  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Список pgsql-admin
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


    --
    -- Name: rewards_points; Type: ACL; Schema: public; Owner: dbname
    --

    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=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x25 (DDS-3).
Soft error count since last status=0
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.

В списке pgsql-admin по дате отправления:

Предыдущее
От: Vishal Arora
Дата:
Сообщение: Re: WAL archiving
Следующее
От: Shilpa Sudhakar
Дата:
Сообщение: Re: WAL archiving