pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: IñigoMartinez Lasala <imartinez@vectorsf.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Data duplication when moving datafiles from one server to another.
Date: Tue, 21 Dec 2010 11:50:24 -0600
Message-ID: <4D10948002000025000388C3@gw.wicourts.gov> (raw)
In-Reply-To: <1292915169.20992.22.camel@deimos>
References: <1292872960.20992.8.camel@deimos>
	<4D0F5D650200002500038840@gw.wicourts.gov>
	<1292915169.20992.22.camel@deimos>

IñigoMartinez Lasala <imartinez@vectorsf.com> wrote:
 
> Data duplication happened on source server (that is, on production
> environment). This data duplication affected only on some tables,
> with some duplicated PKs and altered sequences (sequences value
> didn't match "select max()" and we had to fix it manually).
 
We rsync from production servers all the time, and have never seen
such problems.  Maybe someone else has ideas beyond my long shots
(below).
 
> Postgres version is 8.2.7 64bit on Ubuntu Server 8.04 LTS
 
There have been 12 bug fix releases for the 8.2 major release since
8.2.7.  It's not impossible that you somehow hit a bug which has
been fixed in the last 33 months.
 
http://www.postgresql.org/support/versioning
 
http://www.postgresql.org/docs/8.2/static/release.html
 
> Rsync command was:
> rsync -avt -lHpogDtx /srv/postgresql/8.2/main/
> root@destination_server:/srv/postgresql/8.2/main/
 
Did it run successfully on the first try, or might there have been
an attempt where the target was mis-specified?  A space instead of a
colon between the target server and path might have caused the kind
of corruption you're seeing.
 
Also -- I would avoid using root for such things.  We have remote
root login disabled entirely on our machines, and limit the use of
that login to situations where there is no reasonable alternative.
 
> and was launched from source server.
 
I find it's harder to accidentally damage the remote copy, so I run
rsync from the target where possible.
 
-Kevin



view thread (5+ messages)

Message-ID: <4D10948002000025000388C3@gw.wicourts.gov>
Permalink:  ../4D10948002000025000388C3@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4D10948002000025000388C3@gw.wicourts.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, imartinez@vectorsf.com
  Subject: Re: Data duplication when moving datafiles from one server to another.
  In-Reply-To: <4D10948002000025000388C3@gw.wicourts.gov>
  References: <1292872960.20992.8.camel@deimos> <4D0F5D650200002500038840@gw.wicourts.gov> <1292915169.20992.22.camel@deimos> <4D10948002000025000388C3@gw.wicourts.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox