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

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: "David Wilson" <david(dot)t(dot)wilson(at)gmail(dot)com>
Cc: "John Smith" <sodgodofall(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Backup/Restore of single table in multi TB database
Date: 2008-05-07 20:16:35
Message-ID: 20080507131635.436b6085@jd-laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

On Wed, 7 May 2008 16:09:45 -0400
"David Wilson" <david(dot)t(dot)wilson(at)gmail(dot)com> wrote:

> 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.

Besides the fact that it seems to be a fairly hacky thing to do... it
is going to be fragile. Consider:

(serverA) create table foo();
(serverB) create table foo();

(serverA) Insert stuff;
(serverA) Alter table foo add column;

Oops...

(serverA) alter table foo drop column;

You now have different version of the files than on serverb regardless
of the table name.

Joshua D. Drake

--
The PostgreSQL Company since 1997: http://www.commandprompt.com/
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Simon Riggs 2008-05-07 21:28:44 Re: Backup/Restore of single table in multi TB database
Previous Message Joshua D. Drake 2008-05-07 20:11:25 Re: Backup/Restore of single table in multi TB database

Browse pgsql-performance by date

  From Date Subject
Next Message Simon Riggs 2008-05-07 21:28:44 Re: Backup/Restore of single table in multi TB database
Previous Message Joshua D. Drake 2008-05-07 20:11:25 Re: Backup/Restore of single table in multi TB database