Re: Backup/Restore of single table in multi TB database

From: "David Wilson" <david(dot)t(dot)wilson(at)gmail(dot)com>
To: "John Smith" <sodgodofall(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Backup/Restore of single table in multi TB database
Date: 2008-05-07 20:09:45
Message-ID: e7f9235d0805071309o6d6d7778r6920e5df03a55d3b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

On Wed, May 7, 2008 at 4:02 PM, John Smith <sodgodofall(at)gmail(dot)com> wrote:

> Does anyone see a problem with this approach (e.g., correctness,
> performance, etc.)? Or is there perhaps an alternative approach using
> some other postgresql mechanism that I'm not aware of?

Did you already look at and reject pg_dump for some reason? You can
restrict it to specific tables to dump, and it can work concurrently
with a running system. Your database is large, but how large are the
individual tables you're interested in backing up? pg_dump will be
slower than a file copy, but may be sufficient for your purpose and
will have guaranteed correctness.

I'm fairly certain that you have to be very careful about doing simple
file copies while the system is running, as the files may end up out
of sync based on when each individual one is copied. I haven't done it
myself, but I do know that there are a lot of caveats that someone
with more experience doing that type of backup can hopefully point you
to.

--
- David T. Wilson
david(dot)t(dot)wilson(at)gmail(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2008-05-07 20:11:25 Re: Backup/Restore of single table in multi TB database
Previous Message John Smith 2008-05-07 20:02:57 Backup/Restore of single table in multi TB database

Browse pgsql-performance by date

  From Date Subject
Next Message Joshua D. Drake 2008-05-07 20:11:25 Re: Backup/Restore of single table in multi TB database
Previous Message Alexander Staubo 2008-05-07 20:09:30 Re: Query Optimization with Kruskal’s Algorithm