X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id EB27511F60E3 for ; Fri, 28 Apr 2006 12:25:30 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 33182-06 for ; Fri, 28 Apr 2006 12:25:19 -0300 (ADT) X-Greylist: delayed 00:26:20.265051 by SQLgrey- Received: from bigmail.jlaltd.co.uk (bigmail.jla.com [81.171.198.99]) by postgresql.org (Postfix) with ESMTP id B519F11F60BA for ; Fri, 28 Apr 2006 12:25:18 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by bigmail.jlaltd.co.uk (Postfix) with ESMTP id D41BA2A994A for ; Fri, 28 Apr 2006 15:56:55 +0000 (GMT) Received: from bigmail.jlaltd.co.uk ([127.0.0.1]) by localhost (bigmail [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00947-07 for ; Fri, 28 Apr 2006 15:56:53 +0000 (GMT) Received: from [192.168.0.228] (unknown [192.168.0.228]) by bigmail.jlaltd.co.uk (Postfix) with ESMTP id 624C32A9991 for ; Fri, 28 Apr 2006 15:56:53 +0000 (GMT) Message-ID: <44523B85.4020605@jla.com> Date: Fri, 28 Apr 2006 15:57:57 +0000 From: Steve Burrows User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Backing up large databases Content-Type: multipart/alternative; boundary="------------080003010308030509050701" X-Virus-Scanned: by amavisd-new at jla.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/336 X-Sequence-Number: 21505 This is a multi-part message in MIME format. --------------080003010308030509050701 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I am struggling to find an acceptable way of backing up a PostgreSQL 7.4 database. The database is quite large, currently it occupies about 180GB, divided into two elements, a set of active tables and a set of archive tables which are only used for insertions. I ran pg_dump -Fc recently, it took 23.5 hours to run, and output a single file of 126GB. Obviously as the database continues to grow it will soon be so large that it cannot be pg_dumped within a day. Running rsync to do a complete fresh copy of the pgsql file structure took 4 hours, but later that day running another iteration of rsync (which should have only copied changed files) took 3 hours, and I cannot afford to have the db down that long. Anybody with any ideas? The database is being used as the backend for a mail server, so it has transactions 24 hours a day but is quieter at night. I want to be able to back it up or replicate it on a daily basis with minimum downtime so that the mail backlog doesn't get too large. Ideally I want the first generation of backup/replica going onto the same machine as the original because the volume of data is such that any attempt at network or tape backup of the live files will require too much downtime, once I've got a backup then I can copy that out to other NAS or tape at leisure. If anyone has experience of safeguarding a similarly large PostgreSQL database with minimal downtime I'd be delighted to hear.. The machine is running 2 Xeons, 4GB ram and a half-terabyte RAID10 array on a DELL PERC scsi subsystem, with a load average of around 0.5 - 0.6, so it's not exactly overstretched. Thanks, Steve --------------080003010308030509050701 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I am struggling to find an acceptable way of backing up a PostgreSQL 7.4 database.

The database is quite large, currently it occupies about 180GB, divided into two elements, a set of active tables and a set of archive tables which are only used for insertions.

I ran pg_dump -Fc recently, it took 23.5 hours to run, and output a single file of 126GB. Obviously as the database continues to grow it will soon be so large that it cannot be pg_dumped within a day. Running rsync to do a complete fresh copy of the pgsql file structure took 4 hours, but later that day running another iteration of rsync (which should have only copied changed files) took 3 hours, and I cannot afford to have the db down that long.

Anybody with any ideas? The database is being used as the backend for a mail server, so it has transactions 24 hours a day but is quieter at night. I want to be able to back it up or replicate it on a daily basis with minimum downtime so that the mail backlog doesn't get too large. Ideally I want the first generation of backup/replica going onto the same machine as the original because the volume of data is such that any attempt at network or tape backup of the live files will require too much downtime, once I've got a backup then I can copy that out to other NAS or tape at leisure.

If anyone has experience of safeguarding a similarly large PostgreSQL database with minimal downtime I'd be delighted to hear..  The machine is running 2 Xeons, 4GB ram and a half-terabyte RAID10 array on a DELL PERC scsi subsystem, with a load average of around 0.5 - 0.6, so it's not exactly overstretched.

Thanks,

Steve
--------------080003010308030509050701--